Display & Navigation · Popoverstable
Popover
A floating panel anchored to a trigger for short explanations or small forms, with a title, close button and optional footer actions.
Preview
#previewSwitch placement, alignment and content, then click the trigger. Show code opens the React and CSS below.
placement bottom · align start · text
popover-example.tsx
import { Popover } from "@blade-ai/weft/components/popover";
import { Button } from "@blade-ai/weft/components/button";
export function SettlementInfo() {
return (
<Popover
trigger={<Button variant="secondary" size="small">Details</Button>}
title="Settlement cut-off"
>
Payouts requested after 6 pm settle on the next business day.
</Popover>
);
}All states
#all-statesText and form panels, with and without footer, shown inline. The live panel is absolutely positioned next to its trigger.
Settlement cut-off
Payouts requested after 6 pm settle on the next business day.
Text · 288
Settlement cut-off
Payouts requested after 6 pm settle on the next business day.
Text · with action
Rename batch
Form · 320
Props
#propsUncontrolled by default; pass isOpen with onOpenChange to control it.
Prop
Type
Default
Description
trigger *
ReactElement
—
The element that opens the popover. Must be a single focusable element; it gets aria-haspopup, aria-expanded and the toggle click.
title *
string
—
Header text; also the dialog's accessible name.
children *
ReactNode
—
Body content: text or a form.
footer
ReactNode
—
Right-aligned action row, usually Buttons (size xsmall).
isOpen
boolean
—
Controlled open state. Use with onOpenChange.
isDefaultOpen
boolean
false
Initial state when uncontrolled.
onOpenChange
(isOpen: boolean) => void
—
Fires with the next state on trigger click, Esc, outside click and the close button.
width
number
288
Panel width: 288 for text, 320 for forms.
placement
"bottom" | "top"
"bottom"
Open below or above the trigger.
align
"start" | "end"
"start"
Which trigger edge the panel lines up with.
closeLabel
string
"Close"
Accessible name of the close button.
className
string
—
Extra classes on the panel.
Usage
#usageShort rules for using popover.
Do
Use it for short help or a small form tied to one control.
Keep the title to a few words.
Use width 288 for text and 320 for forms.
Put the primary action last in the footer.
Don't
Don't put long or scrolling content inside.
Don't open one popover from inside another.
Don't use it for blocking decisions; use Modal.
Don't use it for plain hints on hover; use Tooltip.
Accessibility
#accessibilityA non-modal dialog. Focus moves into the panel on open and back to the trigger on close.
Keyboard
Key
Action
Enter / Space
On the trigger, toggles the popover.
Tab / Shift+Tab
Moves through the controls inside the panel.
Esc
Closes the popover and returns focus to the trigger.
ARIA
Element
Role / attribute
When
Trigger
aria-haspopup="dialog", aria-expanded, aria-controls
Always; aria-controls only while open.
Panel
role="dialog", aria-labelledby, tabIndex -1
While open; labelled by the title.
Close button
aria-label
Defaults to Close; set closeLabel to localise.