Arrow
Visually connects the popover content to the trigger element. Will automatically align based on the selected side.
Z-Index
This component is headless by default. If you find the popover content is being clipped, try increasing the z-index on the Positioner part. In some rare cases you may need to use !important to override library defaults.
Provider Pattern
You can programmatically open and close the popover using the Provider Pattern . This is useful for custom interactions and keyboard handling strategies.
Direction
Headless
 API Reference
Root
| Prop | Default | Type | 
|---|---|---|
children | — | ReactNode | 
autoFocus | true | boolean | undefined Whether to automatically set focus on the first focusable content within the popover when opened.  | 
dir | "ltr" | "ltr" | "rtl" | undefined The document's text/writing direction.  | 
ids | — | Partial<{ anchor: string; trigger: string; content: string; title: string; description: string; closeTrigger: string; positioner: string; arrow: string; }> | undefined The ids of the elements in the popover. Useful for composition.  | 
modal | false | boolean | undefined Whether the popover should be modal. When set to `true`: - interaction with outside elements will be disabled - only popover content will be visible to screen readers - scrolling is blocked - focus is trapped within the popover  | 
portalled | true | boolean | undefined Whether the popover is portalled. This will proxy the tabbing behavior regardless of the DOM position of the popover content.  | 
initialFocusEl | — | (() => HTMLElement | null) | undefined The element to focus on when the popover is opened.  | 
closeOnInteractOutside | true | boolean | undefined Whether to close the popover when the user clicks outside of the popover.  | 
closeOnEscape | true | boolean | undefined Whether to close the popover when the escape key is pressed.  | 
onOpenChange | — | ((details: OpenChangeDetails) => void) | undefined Function invoked when the popover opens or closes  | 
positioning | — | PositioningOptions | undefined The user provided options used to position the popover content  | 
open | — | boolean | undefined The controlled open state of the popover  | 
defaultOpen | — | boolean | undefined The initial open state of the popover when rendered. Use when you don't need to control the open state of the popover.  | 
getRootNode | — | (() => Node | ShadowRoot | Document) | undefined A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.  | 
onEscapeKeyDown | — | ((event: KeyboardEvent) => void) | undefined Function called when the escape key is pressed  | 
onRequestDismiss | — | ((event: LayerDismissEvent) => void) | undefined Function called when this layer is closed due to a parent layer being closed  | 
onPointerDownOutside | — | ((event: PointerDownOutsideEvent) => void) | undefined Function called when the pointer is pressed down outside the component  | 
onFocusOutside | — | ((event: FocusOutsideEvent) => void) | undefined Function called when the focus is moved outside the component  | 
onInteractOutside | — | ((event: InteractOutsideEvent) => void) | undefined Function called when an interaction happens outside the component  | 
persistentElements | — | (() => Element | null)[] | undefined Returns the persistent elements that: - should not have pointer-events disabled - should not trigger the dismiss event  | 
Provider
| Prop | Default | Type | 
|---|---|---|
value | — | PopoverApi<PropTypes> | 
children | — | ReactNode | 
Context
| Prop | Default | Type | 
|---|---|---|
children | — | (popover: PopoverApi<PropTypes>) => ReactNode | 
Trigger
| Prop | Default | Type | 
|---|---|---|
children | — | ReactNode | 
element | — | ((attributes: HTMLAttributes<"button">) => Element) | undefined Render the element yourself  | 
Positioner
| Prop | Default | Type | 
|---|---|---|
element | — | ((attributes: HTMLAttributes<"div">) => Element) | undefined Render the element yourself  | 
Content
| Prop | Default | Type | 
|---|---|---|
element | — | ((attributes: HTMLAttributes<"div">) => Element) | undefined Render the element yourself  | 
Arrow
| Prop | Default | Type | 
|---|---|---|
element | — | ((attributes: HTMLAttributes<"div">) => Element) | undefined Render the element yourself  | 
ArrowTip
| Prop | Default | Type | 
|---|---|---|
element | — | ((attributes: HTMLAttributes<"div">) => Element) | undefined Render the element yourself  | 
Title
| Prop | Default | Type | 
|---|---|---|
element | — | ((attributes: HTMLAttributes<"div">) => Element) | undefined Render the element yourself  | 
Description
| Prop | Default | Type | 
|---|---|---|
element | — | ((attributes: HTMLAttributes<"div">) => Element) | undefined Render the element yourself  | 
CloseTrigger
| Prop | Default | Type | 
|---|---|---|
element | — | ((attributes: HTMLAttributes<"button">) => Element) | undefined Render the element yourself  | 
Root
| Prop | Default | Type | 
|---|---|---|
dir | "ltr" | "ltr" | "rtl" | undefined The document's text/writing direction.  | 
ids | — | Partial<{ anchor: string; trigger: string; content: string; title: string; description: string; closeTrigger: string; positioner: string; arrow: string; }> | undefined The ids of the elements in the popover. Useful for composition.  | 
modal | false | boolean | undefined Whether the popover should be modal. When set to `true`: - interaction with outside elements will be disabled - only popover content will be visible to screen readers - scrolling is blocked - focus is trapped within the popover  | 
portalled | true | boolean | undefined Whether the popover is portalled. This will proxy the tabbing behavior regardless of the DOM position of the popover content.  | 
autoFocus | true | boolean | undefined Whether to automatically set focus on the first focusable content within the popover when opened.  | 
initialFocusEl | — | (() => HTMLElement | null) | undefined The element to focus on when the popover is opened.  | 
closeOnInteractOutside | true | boolean | undefined Whether to close the popover when the user clicks outside of the popover.  | 
closeOnEscape | true | boolean | undefined Whether to close the popover when the escape key is pressed.  | 
onOpenChange | — | ((details: OpenChangeDetails) => void) | undefined Function invoked when the popover opens or closes  | 
positioning | — | PositioningOptions | undefined The user provided options used to position the popover content  | 
open | — | boolean | undefined The controlled open state of the popover  | 
defaultOpen | — | boolean | undefined The initial open state of the popover when rendered. Use when you don't need to control the open state of the popover.  | 
getRootNode | — | (() => Node | ShadowRoot | Document) | undefined A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.  | 
onEscapeKeyDown | — | ((event: KeyboardEvent) => void) | undefined Function called when the escape key is pressed  | 
onRequestDismiss | — | ((event: LayerDismissEvent) => void) | undefined Function called when this layer is closed due to a parent layer being closed  | 
onPointerDownOutside | — | ((event: PointerDownOutsideEvent) => void) | undefined Function called when the pointer is pressed down outside the component  | 
onFocusOutside | — | ((event: FocusOutsideEvent) => void) | undefined Function called when the focus is moved outside the component  | 
onInteractOutside | — | ((event: InteractOutsideEvent) => void) | undefined Function called when an interaction happens outside the component  | 
persistentElements | — | (() => Element | null)[] | undefined Returns the persistent elements that: - should not have pointer-events disabled - should not trigger the dismiss event  | 
children | — | Snippet<[]> | undefined The default slot content to be rendered within the component.  | 
Provider
| Prop | Default | Type | 
|---|---|---|
value | — | () => PopoverApi<PropTypes> | 
children | — | Snippet<[]> | undefined The default slot content to be rendered within the component.  | 
Context
| Prop | Default | Type | 
|---|---|---|
children | — | Snippet<[() => PopoverApi<PropTypes>]> | 
Trigger
| Prop | Default | Type | 
|---|---|---|
element | — | Snippet<[HTMLAttributes<"button">]> | undefined Render the element yourself  | 
Positioner
| Prop | Default | Type | 
|---|---|---|
element | — | Snippet<[HTMLAttributes<"div">]> | undefined Render the element yourself  | 
Content
| Prop | Default | Type | 
|---|---|---|
element | — | Snippet<[HTMLAttributes<"div">]> | undefined Render the element yourself  | 
Arrow
| Prop | Default | Type | 
|---|---|---|
element | — | Snippet<[HTMLAttributes<"div">]> | undefined Render the element yourself  | 
ArrowTip
| Prop | Default | Type | 
|---|---|---|
element | — | Snippet<[HTMLAttributes<"div">]> | undefined Render the element yourself  | 
Title
| Prop | Default | Type | 
|---|---|---|
element | — | Snippet<[HTMLAttributes<"div">]> | undefined Render the element yourself  | 
Description
| Prop | Default | Type | 
|---|---|---|
element | — | Snippet<[HTMLAttributes<"div">]> | undefined Render the element yourself  | 
CloseTrigger
| Prop | Default | Type | 
|---|---|---|
element | — | Snippet<[HTMLAttributes<"button">]> | undefined Render the element yourself  |