Popover
Anchored panel with title and actions.
Installation
Usage
Examples
With actions
Close and confirm controls in a footer band.
Side placement
Dock the panel to any trigger edge.
With input
Collect a value without leaving the page.
API reference
Popover
| Prop | Type | Default |
|---|---|---|
openControlled open state. Use with onOpenChange. | boolean | - |
defaultOpenInitially open when uncontrolled. | boolean | false |
onOpenChangeCalled when the popover opens or closes. | (open: boolean) => void | - |
onOpenChangeCompleteCalled after open or close animations finish. | (open: boolean) => void | - |
modalLimit interaction to the popover while open. | boolean | 'trap-focus' | - |
PopoverContent
| Prop | Type | Default |
|---|---|---|
sidePreferred placement side. | "top" | "right" | "bottom" | "left" | "bottom" |
sideOffsetGap between trigger and panel. | number | 4 |
alignAlignment against the trigger edge. | "start" | "center" | "end" | "center" |
alignOffsetOffset along the alignment axis. | number | 0 |
renderPolymorphic render prop. Use to render a custom element instead of the default panel. | ReactElement | ((props) => ReactNode) | - |
classNameAdditional classes merged with the default panel styles. | string | - |
PopoverTrigger
| Prop | Type | Default |
|---|---|---|
renderRender a custom trigger element, e.g. render={<Button>Open popover</Button>}. | ReactElement | ((props) => ReactNode) | - |
disabledDisable the trigger. | boolean | false |
PopoverClose
| Prop | Type | Default |
|---|---|---|
renderRender a custom close control. Must live inside the popover. | ReactElement | ((props) => ReactNode) | - |
PopoverTitle
| Prop | Type | Default |
|---|---|---|
classNameAdditional classes merged with the title styles. | string | - |
PopoverDescription
| Prop | Type | Default |
|---|---|---|
classNameAdditional classes merged with the muted description styles. | string | - |