Popover
Content that opens next to its trigger, above the screen but not modal, flipping and shifting to stay in the window.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
label | string | The popover's accessible name. | |
open | boolean | bindable(false) | Whether the popover shows. The trigger piece toggles it; Escape or a press outside clears it. |
placement | "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | bottom | Which side of the trigger it prefers, and how it lines up with it. |
Pieces
| Piece | Means |
|---|---|
trigger | The control that opens the popover. |
Children
The popover's content.
States
| State | Looks like |
|---|---|
open | A surface panel up to 320px wide, with a border, a large radius and shadow, 6px from its trigger. |
flipped | On the other side of the trigger when the preferred side has no room; shifted along to keep 8px from the window's edges. |
opening | Fades and slides 4px towards its side, in 140 ms; at once with reduced motion. |
Accessibility
| role | dialog, not modal |
| name | The label prop (aria-label). |
| focus | On open, focus moves to the first focusable element inside, else the popover itself. The page stays usable. On close, focus returns to the trigger. |
| keyboard | Escape closes it. |
| notes | The trigger carries aria-haspopup="dialog", aria-expanded and aria-controls. |
Theme tokens
color.surface color.ink color.border shadow.lg radius.lg space.3 space.4
Example
<Popover label="About"><piece name="trigger"><Button label="Details" variant="ghost" /></piece><text>Posted today</text></Popover>