Import
Description
A popover component that displays floating content anchored to a trigger element. Supports advanced positioning with collision detection and can be opened on hover or click.High-Level API
Props
Component that triggers the popover
Popover title text or component
Description shown below the title
Main popover content
Initial open state when uncontrolled
Controlled open state
Modal behavior:
True: Focus trapped, scroll locked, pointer interactions disabledFalse: Full document interaction allowed'trap-focus': Focus trapped but scroll/pointer enabled
Trigger Props
Open popover on hover instead of click
Delay in ms before opening on hover
Delay in ms before closing when hover ends
Positioning Props
Which side of the trigger to align against
How to align the popup relative to the side
Distance between trigger and popup in pixels
Offset along the alignment axis in pixels
Minimum distance between arrow and popup edges
Element selector to position against (defaults to trigger)
Boundary element for collision detection
Padding from collision boundary edges
Maintain popup position after anchor scrolls out of view
CSS position property to use
Disable tracking anchor’s layout shifts
Portal Props
Parent element selector for portal
Keep portal mounted when hidden
Event Handlers
Called when popover opens or closes
Called after animations complete
Compositional API
popover.root()
Root container for all popover parts.Initial open state
Controlled open state
Modal state behavior
popover.trigger()
Button that opens the popover. Renders a<button> element.
Render as native button element
Enable hover triggering
Hover open delay (ms)
Hover close delay (ms)
Custom trigger component
popover.backdrop()
Overlay beneath the popup. Renders a<div> element.
Custom backdrop component
popover.portal()
Portals popup to different DOM location.Parent element selector
Keep mounted when hidden
popover.positioner()
Positions the popup against the trigger. Renders a<div> element.
Alignment relative to side
Alignment axis offset
Which side to align to
Distance from trigger
Arrow edge padding
Position anchor element
Collision boundary element
Boundary padding
Maintain position on scroll
CSS position method
Disable anchor tracking
Collision handling strategy
Custom positioner component
popover.popup()
Container for popover content. Renders a<div> element.
Element selector to focus on open
Element selector to focus on close
Custom popup component
popover.arrow()
Arrow pointing to the trigger. Renders a<div> element.
Custom arrow component
popover.title()
Heading that labels the popover. Renders an<h2> element.
Custom title component
popover.description()
Additional information paragraph. Renders a<p> element.
Custom description component
popover.close()
Button that closes the popover. Renders a<button> element.
Custom close button component
Class Names
Access default class names viapopover.class_names:
ROOT: Root container stylingTRIGGER: Trigger button stylingBACKDROP: Backdrop overlay stylingPORTAL: Portal stylingPOSITIONER: Positioner stylingPOPUP: Popup container stylingARROW: Arrow element stylingTITLE: Title text stylingDESCRIPTION: Description text stylingCLOSE: Close button styling