Popover
A wrapper around React Aria’s DialogTrigger and Popover components. Unlike Tooltip,
a Popover can contain interactive elements such as forms, links, or buttons.
Add via CLI
Section titled “Add via CLI”npx @a2ra/cli add popoverExample JSON
Section titled “Example JSON”{ "type": "Popover", "props": { "triggerLabel": "Filter options", "placement": "bottom" }, "children": [ { "type": "Form", "props": { "gap": "sm" }, "children": [ { "type": "Checkbox", "props": { "label": "In stock only", "value": "instock" } } ] } ]}| Prop | Type | Description |
|---|---|---|
triggerLabel | string | Label for the trigger button |
placement | topbottom defaultleftright | Preferred position |
isOpen | boolean | Controlled open state |
defaultOpen | truefalse default | Open on mount |
offset | number | Distance from the trigger in pixels. Default: 8 |
crossOffset | number | Perpendicular offset in pixels. Default: 0 |
shouldFlip | true defaultfalse | Flip to opposite side when out of bounds |
isKeyboardDismissDisabled | truefalse default | Prevent Escape from closing |
maxHeight | number | Maximum height in pixels before scrolling |
children | node[] | Content rendered inside the popover |
- Use
Tooltipfor non-interactive hints. UsePopoverwhen the content has clickable elements. Escapecloses the popover and returns focus to the trigger by default.maxHeightenables internal scrolling for long content without affecting the page layout.