Dropdown Menuv0.4.2Ready for Production
A compact, accessible menu component for product interfaces with nested submenus, keyboard shortcuts, and professional styling. Built on Radix UI primitives.
Prefer AI-assisted development?
Catalyst Dropdown Menu extends Radix UI's DropdownMenu primitive with built-in design tokens, CVA size variants, and a danger prop — giving you a production-ready menu with keyboard navigation and accessible focus management out of the box.
Installation
npm install @pmi/catalyst-dropdown-menuimport {
DropdownMenuRoot,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
} from '@pmi/catalyst-dropdown-menu';Sizes
Three sizes are available: sm, md (default), and lg.
Common Patterns
With Arrow
Use DropdownMenuArrow inside DropdownMenuContent to render a visual pointer toward the trigger.
Account Menu
Account Menu with Profile Header
Help Center Menu
API Reference
Dropdown Menu is a compound component built on Radix UI primitives. The sections below summarize the Catalyst-specific API for each part.
DropdownMenuRoot
Root container that manages open/closed state. Accepts all standard Radix DropdownMenu Root props and forwards ref.
DropdownMenuTrigger
Element that opens the menu. Accepts all standard Radix DropdownMenu Trigger props. Use asChild to render your own element.
DropdownMenuPortal
Renders the menu into a portal. Accepts all standard Radix DropdownMenu Portal props.
DropdownMenuContent
The popover container for menu items. Forwards ref to the underlying element.
Prop
Type
Accepts all standard Radix DropdownMenu Content props (side, align, sideOffset, etc.).
DropdownMenuItem
An interactive menu item. Forwards ref to the underlying element.
Prop
Type
Accepts all standard Radix DropdownMenu Item props (disabled, onSelect, etc.).
DropdownMenuLabel
A non-interactive label for grouping items. Forwards ref to the underlying element.
Prop
Type
DropdownMenuSeparator
A visual divider between groups. Forwards ref to the underlying element.
Prop
Type
DropdownMenuSub
Container for a nested submenu. Accepts all standard Radix DropdownMenu Sub props.
DropdownMenuSubTrigger
Trigger for a nested submenu. Forwards ref to the underlying element.
Prop
Type
Accepts all standard Radix DropdownMenu SubTrigger props (disabled, etc.).
DropdownMenuSubContent
Content panel for a nested submenu. Forwards ref to the underlying element.
Prop
Type
Accepts all standard Radix DropdownMenu SubContent props.
DropdownMenuArrow
Optional visual arrow pointing to the trigger. Forwards ref to the underlying element.
Prop
Type
Accessibility
Dropdown Menu is designed to meet WCAG 2.2 AA standards. Keyboard behavior and ARIA semantics are inherited from Radix UI.
Keyboard Interactions
| Key | Action |
|---|---|
ArrowDown | Moves focus to the next menu item |
ArrowUp | Moves focus to the previous menu item |
ArrowRight | Opens a submenu when focus is on a sub-trigger |
ArrowLeft | Closes the current submenu |
Escape | Closes the menu and returns focus to trigger |
ARIA
aria-haspopup="menu"andaria-expandedare automatically set on the trigger — inherited from Radix.- Each menu item has
role="menuitem"; disabled items usearia-disabled="true". - Always provide a visible or visually-hidden label on icon-only triggers (e.g.
<span className="sr-only">Show options</span>). - Group related items with
DropdownMenuLabelandDropdownMenuSeparatorfor screen reader context.
See the Radix DropdownMenu accessibility docs for inherited baseline behavior.
Choosing the Right Component
Use Dropdown Menu when you need a list of actions triggered by a button click. Reach for a different primitive when:
| If you need… | Use instead |
|---|---|
| A menu triggered by right-clicking on an element | Context Menu |
| A navigational link list, not an action menu | Navigation Menu |
| A small contextual overlay anchored to a trigger with custom content | Popover |
| Mutually exclusive option selection | Select |
Related
Context Menu
A right-click context menu primitive with nested submenus, keyboard shortcuts, danger states, and three size variants.
Footer
A responsive Footer Component is a structured layout element designed for displaying copyright notices, legal information, navigation links, and branding. It is composed of multiple subcomponents for better modularity and flexibility.