Component
Popover
Published on
Description
The Popover component displays content in an overlay that appears on demand. It uses the native HTML popover attribute, which provides built-in light-dismiss behavior and top-layer rendering. A PopoverHint variant uses popover="hint" for tooltip-style overlays.
Use popovers for supplemental content such as tooltips, menus, or additional details. For content that requires user acknowledgment, use a Dialog instead.
Example
Accessibility
- The trigger button should use the
popovertargetattribute to associate it with the popover element. - Popovers are rendered in the top layer, ensuring they appear above all other content.
- Light-dismiss allows closing by clicking outside or pressing Escape.
- Focus management is handled natively by the browser.
References
- A Brief Note on Popovers with Dialogs (opens in new tab) — Adrian Roselli
- Disclosure Widgets (opens in new tab) — Adrian Roselli
Related
- Dialog — for modal content that blocks interaction with the page
- Disclosure — for inline expandable content
Variables
None