Popover
Displays rich content in a portal, triggered by a button.
Usage
Popover Props
The Popover component consists of several parts, each with their own props:
Popover.Root Props
Prop | Type | Default |
---|---|---|
defaultOpen | boolean | - |
open | boolean | - |
onOpenChange | ((open: boolean) => void) | - |
modal | boolean | - |
Popover.Content Props
Prop | Type | Default |
---|---|---|
ariaLabel | string | "Popover content" |
side | "top" | "right" | "bottom" | "left" | - |
sideOffset | number | - |
align | "start" | "center" | "end" | - |
alignOffset | number | - |
avoidCollisions | boolean | - |
collisionPadding | number | - |
Popover.Trigger Props
Prop | Type | Default |
---|---|---|
asChild | boolean | - |
Examples
Positioning
Control the position and alignment of your popover relative to its trigger.
Alignment
Customize how the popover aligns with its trigger.
Accessibility
The Callout component includes appropriate ARIA attributes for accessibility:
- Uses semantic HTML elements for proper structure
- Dismiss button includes
aria-label
for screen readers