Skip to Content
✨ QuickCode UI keeps growing! More components, more features, and more ways to make your projects shine. Stay tuned & maybe… hire me or sponsor me 😉 
DocumentationPopover

Popover

A floating content container that displays rich content in a portal, positioned relative to a trigger element with intelligent vertical positioning.

Install Dependencies

npx
quickcode-ui add Popover

Example

Default Example

Props

Popover

Root component that manages popover state and provides context.

PropTypeDefaultDescription
childrenReact.ReactNodeTrigger and Content components
openbooleanundefinedControlled open state
onOpenChange(open: boolean) => voidundefinedCallback when open state changes

Popover.Trigger

Trigger element that opens the popover when clicked.

PropTypeDefaultDescription
childrenReact.ReactNodeTrigger content
asChildbooleanfalseMerges props with child element instead of wrapping
classNamestringundefinedAdditional CSS classes

Popover.Content

The popover content container with intelligent positioning.

PropTypeDefaultDescription
childrenReact.ReactNodeContent to display in the popover
align"start" | "center" | "end""center"Horizontal alignment relative to trigger
sideOffsetnumber8Distance in pixels from trigger element
classNamestringundefinedAdditional CSS classes

Popover.Close

Button that closes the popover when clicked.

PropTypeDefaultDescription
childrenReact.ReactNodeButton content
onClick(e: React.MouseEvent) => voidundefinedAdditional click handler
classNamestringundefinedAdditional CSS classes
Last updated on