Popover
An anchored non-modal floating layer for compact interactive content.
A non-modal floating panel anchored to a trigger element, suited for compact forms, filters, or contextual actions.
Preview
Section titled “Preview” Web Components React Vue Vue 2
Loading interactive preview… The article and source are ready to read. Interactive controls will appear here when ready.
Installation
Section titled “Installation”Available starting in 0.3.0-rc.1 and later releases.
Compose Root, Trigger, Content, Title, Description, and Close:
- Positioning and non-modal behavior:
Contentpositions relative toTriggerwithside,align,sideOffset,alignOffset, andcollisionPadding. Because it is non-modal, background scrolling stays active andTabfocus is not trapped. - Dismissal and focus: Outside press, focus leaving
TriggerandContent,Escape, andCloseall request dismissal. Moving focus betweenTriggerand portalledContentcounts as internal interaction; closing due to focus leaving keeps focus on the newly focused outside element instead of pulling it back toTrigger. - Controlled and uncontrolled: Use
defaultOpenfor uncontrolled state, or passopenand handleopenChangefor controlled state (focus-only dismissal requests reportfocusReasonas'programmatic'). If a controlled handler declines afocus.outsiderequest,Contentstays visible without trapping focus and later interactions can still request dismissal. Disabled triggers do not activate.
| Prop | Type | Default |
|---|---|---|
defaultOpen | boolean | false |
disabled | boolean | false |
a11yLabel | string | '' |
Pass open to control the open state.
Part Props
Section titled “Part Props”- Content: Accepts
Transitionprops plusside(default'bottom'),align(default'center'),sideOffset(default4),alignOffset(default0), andcollisionPadding(default8). - Trigger, Title, Description, Close: No additional props.