Skip to main content

Examples

Default

Open

With Toolbar Action

Props

Popover

Root of a popover. Holds the open state shared by its trigger and content. A direct re-export of the Radix PopoverPrimitive.Root primitive. It accepts all of that primitive’s props, unchanged.

PopoverAnchor

Optional element the content positions against instead of the trigger. A direct re-export of the Radix PopoverPrimitive.Anchor primitive. It accepts all of that primitive’s props, unchanged.

PopoverClose

Element that closes the popover when activated. Use asChild to render your own button. A direct re-export of the Radix PopoverPrimitive.Close primitive. It accepts all of that primitive’s props, unchanged.

PopoverContent

Floating panel rendered in a portal, styled like the DropdownMenuContent surface. Focus moves into it on open and returns to the trigger on close. It renders a role="dialog", so pass aria-label or aria-labelledby to name it. The content unmounts when closed; forceMount is not supported.
"center" | "end" | "start"
default:"start"
Alignment of the content against the trigger.
boolean
string
Additional CSS classes merged onto the content surface.
number | Partial<Record<"top" | "bottom" | "left" | "right", number>>
default:"16"
Distance in pixels kept between the content and the viewport edge, as a number or a per-side object.
number
default:"8"
Distance in pixels between the trigger and the content.

PopoverTrigger

Element that toggles the popover. Use asChild to render your own button. On touch and pen, a press-and-release that moves past a small threshold counts as a drag, and the synthetic click that follows it is ignored, so scrolling past the trigger does not open it.
boolean

Exported types

Also exported from @fanvue/ui: PopoverAnchorProps, PopoverCloseProps, PopoverContentBaseProps, PopoverContentName, PopoverContentProps, PopoverProps, PopoverTriggerProps.
Setup: Installation · Theming