| title | Popover |
|---|---|
| description | Displays rich content in a portal, triggered by a button. |
| source | packages/raystack/components/popover |
import { playground, alignDemo, positionDemo } from "./demo.ts";
Import and assemble the component:
import { Popover } from "@raystack/apsara";
<Popover>
<Popover.Trigger />
<Popover.Content />
</Popover>Groups all parts of the popover.
Renders the popover content panel.
Renders the element that opens the popover.
Control the position and alignment of your popover relative to its trigger.
Customize how the popover aligns with its trigger.
- Follows the WAI-ARIA Dialog pattern
- Trigger uses
aria-haspopupandaria-expandedattributes - Focus is managed when opening and closing the popover
- Supports dismissal with Escape key
- Respects motion preferences: popover entry motion is enabled only when
prefers-reduced-motion: no-preference