Popoverv1.0.12Ready for Production
A popup that displays rich content and interactive elements when a user clicks on a trigger element, with product-specific styling options.
Prefer AI-assisted development?
Catalyst Popover wraps Radix UI Popover to provide a click-triggered overlay for rich, interactive content — forms, lists, actions — with Catalyst design token styling and smooth entrance animations out of the box.
Installation
npm install @pmi/catalyst-popoverimport {
PopoverRoot,
PopoverTrigger,
PopoverContent,
PopoverArrow,
PopoverPortal,
PopoverAnchor,
PopoverClose,
} from '@pmi/catalyst-popover';Tailwind Config
The package ships a Tailwind preset with slide-and-fade entrance animations. Add it to your config:
import tailwindPopoverPreset from '@pmi/catalyst-popover/tailwind.config';
export default {
content: ['./src/**/*.{ts,tsx,js,jsx}', './node_modules/@pmi/catalyst-*/**/*.{ts,tsx,js,jsx}'],
presets: [tailwindPopoverPreset],
};Common Patterns
Arrow
Side
Align
Portal
Precomposed
List View
API Reference
PopoverRoot
Root container that manages open/close state. Renders no DOM element itself.
Prop
Type
PopoverTrigger
Button that opens the popover on click. Ships with Catalyst focus-visible ring styles.
Prop
Type
PopoverContent
The floating panel containing popover content. Ships with Catalyst default dark/light background, padding, and animation classes.
Prop
Type
PopoverArrow
Optional arrow element pointing toward the trigger. Use [&_.popover-arrow]:fill-* on PopoverContent to match the arrow colour to a custom background.
Prop
Type
PopoverPortal
Portals PopoverContent to document.body for z-index isolation. Accepts the standard Radix Popover Portal props (container, forceMount).
PopoverAnchor
Positions the popover against a custom element instead of the trigger.
Prop
Type
PopoverClose
Button inside the popover that dismisses it when clicked.
Prop
Type
Accessibility
Popover is designed to meet WCAG 2.2 AA standards.
Keyboard Interactions
| Key | Action |
|---|---|
Space / Enter | Opens the popover when focus is on PopoverTrigger |
Tab | Moves focus to the next interactive element inside the popover |
Shift+Tab | Moves focus to the previous interactive element inside the popover |
Escape | Closes the popover and returns focus to the trigger |
ARIA
PopoverTriggerreceivesaria-expandedandaria-controlstoggled by Radix automatically.PopoverContentreceivesrole="dialog"from Radix and is announced when it opens.- Add
aria-labeloraria-labelledbytoPopoverContentwhen the popover has no visible heading. - Set
modal={true}onPopoverRootto trap focus within the popover when using interactive content. PopoverArrowis markedaria-hidden="true"— purely decorative.
See the Radix Popover accessibility docs for full inherited behaviour.
Choosing the Right Component
Use Popover for click-triggered panels with interactive content. Reach for a different primitive when:
| If you need… | Use instead |
|---|---|
| Hover-triggered supplementary text | Tooltip |
| A blocking modal for critical actions | Dialog |
| A menu of selectable actions | Dropdown Menu |
Related
Drawer
A mobile-optimized bottom sheet component for interfaces with full custom styling support. Built on Vaul with swipe gestures, scroll handling, and brand theming capabilities.
Sheet
A slide-out panel built on Radix UI Dialog with CVA side variants, modal and complementary modes, and full keyboard accessibility.