Skip to content
GitHub

Popover

Overlay with extra info or options on trigger.

Installation

Usage

Title and Description

<PopoverHeader /> supports two usage patterns:

Using props

Pass title and description props directly to <PopoverHeader />.

This approach does not require <PopoverTitle /> or <PopoverDescription /> components.

Using components

Alternatively, use <PopoverTitle /> and <PopoverDescription /> as children for more control.

Positioning

Control the position of the popover relative to the trigger using the positioning prop.

Examples

Non-modal

To make the popover non-modal, set the modal prop to false.

Nested

Nest popovers within one another.

Anchor

Use <PopoverAnchor /> to position the popover relative to a different element than the trigger.

Close button

Use showCloseButton prop to show a close button in the top-right corner.

Close behavior

Use closeOnInteractOutside and closeOnEscape props to prevent closing on outside click and escape.

With Scroll

Use <PopoverBody /> to make the content area scrollable while keeping header and footer fixed.

Inside dialog

Render a popover inside a dialog.

Custom spacing

Use [--space:--spacing("value")] on <PopoverContent /> to adjust internal padding (default --spacing(4)).

API Reference

Popover

Root element of the popover.

PopoverTrigger

Opens the popover on click. Use asChild for custom trigger elements.

PopoverAnchor

Element the popover is positioned relative to. Use when the reference is not the trigger.

PopoverContent

Holds the popover panel content. Displayed in a portal.

PopoverHeader

Header container. Accepts title and description props or children.

PopoverTitle

Accessible title for the popover panel.

PopoverDescription

Accessible description for the popover panel.

PopoverBody

Scrollable content area. Uses ScrollArea for overflow.

PopoverFooter

Footer area for actions or secondary content.

PopoverClose

Closes the popover on click. Use asChild for custom close elements.

PopoverArrow

Optional arrow pointing toward the trigger element.


For a complete list of props, see the Ark UI documentation.