Menubarv0.2.14Documentation Under Review
A horizontal menu bar component for creating application-style navigation menus with submenus, keyboard shortcuts, checkboxes, and radio items. Built on Radix UI primitives.
Prefer AI-assisted development?
Catalyst Menubar wraps Radix UI Menubar to provide a visually persistent, desktop-style menu bar with full keyboard navigation, submenus, checkbox and radio items, and Catalyst design token styling out of the box.
Installation
npm install @pmi/catalyst-menubarimport {
MenubarRoot,
MenubarMenu,
MenubarTrigger,
MenubarPortal,
MenubarContent,
MenubarItem,
MenubarSeparator,
MenubarCheckboxItem,
MenubarRadioGroup,
MenubarRadioItem,
MenubarItemIndicator,
MenubarLabel,
MenubarSub,
MenubarSubTrigger,
MenubarSubContent,
} from '@pmi/catalyst-menubar';API Reference
Menubar is a compound component built on Radix UI primitives. Each part is a direct re-export of its Radix counterpart with Catalyst's cn() utility applied for className merging.
MenubarRoot
Root container for the menu bar. Manages which menu is open.
Accepts all standard Radix Menubar Root props and forwards ref to the underlying element.
Prop
Type
MenubarMenu
Container for a single trigger + content pair. Place multiple within MenubarRoot.
Accepts all standard Radix Menubar Menu props (value).
MenubarTrigger
Button that opens a menu when clicked or when focus moves to it via arrow keys.
Accepts all standard Radix Menubar Trigger props (disabled, className).
MenubarPortal
Portals menu content to document.body to avoid z-index stacking issues.
Accepts all standard Radix Menubar Portal props (container).
MenubarContent
Dropdown panel containing menu items. Wrap inside MenubarPortal.
Accepts all standard Radix Menubar Content props and forwards ref.
Prop
Type
MenubarItem
A selectable menu item.
Accepts all standard Radix Menubar Item props and forwards ref.
Prop
Type
MenubarCheckboxItem
A menu item with a toggleable checked state.
Accepts all standard Radix Menubar CheckboxItem props and forwards ref.
Prop
Type
MenubarRadioGroup
Container for a group of radio items — only one can be selected at a time.
Accepts all standard Radix Menubar RadioGroup props (value, onValueChange).
MenubarRadioItem
A menu item with radio-button behaviour.
Accepts all standard Radix Menubar RadioItem props and forwards ref.
Prop
Type
MenubarItemIndicator
Renders inside MenubarCheckboxItem or MenubarRadioItem when the item is checked — use for custom check/radio icons.
Accepts all standard Radix Menubar ItemIndicator props and forwards ref (forceMount, className).
MenubarSeparator
Visual divider between groups of menu items.
Accepts all standard Radix Menubar Separator props and forwards ref (className).
MenubarLabel
Non-interactive label for grouping related items.
Accepts all standard Radix Menubar Label props and forwards ref (className).
MenubarSub
Container for a nested submenu structure.
Accepts all standard Radix Menubar Sub props (open, onOpenChange, defaultOpen).
MenubarSubTrigger
Item inside a menu that opens a nested MenubarSub.
Accepts all standard Radix Menubar SubTrigger props and forwards ref.
Prop
Type
MenubarSubContent
Dropdown panel for submenu items. Wrap inside MenubarPortal.
Accepts all standard Radix Menubar SubContent props and forwards ref.
Prop
Type
Accessibility
Menubar is designed to meet WCAG 2.2 AA standards.
Keyboard Interactions
| Key | Action |
|---|---|
Tab | Moves focus to the first MenubarTrigger; subsequent Tab moves focus out of the menubar |
Arrow Left / Right | Navigates between MenubarTrigger elements; wraps when loop is set |
Space / Enter | Opens the focused trigger's menu |
Arrow Down | Opens the focused trigger's menu and moves focus to the first item |
Arrow Up / Down | Navigates between menu items within an open menu |
Arrow Right | Opens a submenu when focus is on a MenubarSubTrigger |
Arrow Left | Closes a submenu and returns focus to the MenubarSubTrigger |
Home | Moves focus to the first menu item |
End | Moves focus to the last menu item |
Escape | Closes the open menu and returns focus to the trigger |
| Character key | Typeahead: moves focus to the first item matching the typed character |
ARIA
MenubarRootreceivesrole="menubar"from Radix.MenubarContent/MenubarSubContentreceiverole="menu".MenubarItemreceivesrole="menuitem";MenubarCheckboxItemreceivesrole="menuitemcheckbox";MenubarRadioItemreceivesrole="menuitemradio".MenubarTriggerreceivesaria-haspopup="menu"andaria-expandedtoggled by Radix automatically.aria-disabledis set on disabled triggers and items.- Catalyst provides visual styling tokens; Radix provides all underlying ARIA semantics and focus management.
- Keyboard shortcut hints (e.g.
⌘+T) are decorative — addaria-hidden="true"to their container so they are not announced twice.
See the Radix Menubar accessibility docs for full inherited behavior.
Choosing the Right Component
Use Menubar when you need a persistent horizontal application-style menu bar. Reach for a different primitive when:
| If you need… | Use instead |
|---|---|
| A dropdown from a single button | Dropdown Menu |
| A menu triggered by right-clicking | Context Menu |
| Site-level navigation with flyout panels | Navigation Menu |
Related
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.
Navigation Menu
A collection of links for navigating internal applications with accessible multi-level dropdown support and customizable styling.