Popover
A non-modal layer with six CSS placements — the page behind stays interactive.
Live preview
Source
The exact file rendered in the preview above.
components/demos/popover.tsx
components/ui/popover.tsx
hooks/use-dismiss.ts
Demo source — adapt to your project. Foundry is not published as a package.
Usage
For secondary controls and explanations that should not interrupt: column pickers, filter summaries, "what does this mean". If the user must deal with it before continuing, it is a Dialog.
- Positioning is pure CSS. Six placements cover every use in this library without a positioning dependency.
- Focus moves into the panel on open but is not trapped — Tab is allowed to leave, which closes it.
- A popover may contain interactive content; a tooltip may not.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Six placements
- With form controls
- As an explanation
Accessibility
- Roles
- Trigger carries `aria-haspopup="dialog"` and `aria-expanded`; the panel is a labelled `role="dialog"`.
- Dismissal
- Escape closes and returns focus to the trigger; an outside press closes without stealing focus.
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All componentsDropdown menu
The ARIA menu-button pattern with grouped items, roving focus, shortcuts and destructive styling.
intermediateFeatured6 variantsTooltip
Supplementary text on hover and on keyboard focus, dismissible with Escape.
starter3 variantsDialog
A modal with focus trapping, scroll locking, Escape dismissal and focus return — in four sizes.
advancedFeatured5 variants