Popover
Transient overlay content with positioning and optional title/description.
Import
Basic Usage
Props
Popover
| Prop | Type | Default | Description |
|---|---|---|---|
| trigger | React.ReactElement | - | Element that triggers the popover to open |
| children | React.ReactNode | - | Popover content |
| side | 'top' | 'bottom' | 'left' | 'right' | 'bottom' | Placement relative to trigger |
| align | 'start' | 'center' | 'end' | 'center' | Alignment along the side |
| sideOffset | number | 4 | Distance from the trigger element in pixels |
| open | boolean | - | Whether the popover is open (controlled) |
| defaultOpen | boolean | - | Default open state (uncontrolled) |
| onOpenChange | (open: boolean) => void | - | Callback when open state changes |
| className | string | - | Additional CSS class names for the popup |
Variants
Positions
With Form
With Close Button
Controlled
Compound Components
For advanced usage: