Components

Menubar

A desktop-style application menu bar — a persistent horizontal set of dropdown menus for organizing commands, shortcuts, and toggles.

Basic usage

Compose MenubarMenu blocks inside a Menubar. Open state is managed by Radix, so no useState is required.

Checkbox & radio items

Use MenubarCheckboxItem for toggles and MenubarRadioGroup for single-choice options.

Submenus & destructive items

Nest MenubarSub for cascading menus, and pass variant="destructive" to flag dangerous actions.

Props

PropTypeDefaultDescription
MenubarMenubarPrimitive.RootRoot container that renders the horizontal bar of menus and manages roving focus between them.
MenubarMenuMenubarPrimitive.MenuWraps a single trigger and its content. Accepts an optional `value` to control which menu is open.
MenubarTriggerMenubarPrimitive.TriggerThe button in the bar that opens its menu on click or keyboard activation.
MenubarContentMenubarPrimitive.ContentThe floating panel of items. Defaults: align="start", alignOffset={-4}, sideOffset={8}.
MenubarItemMenubarPrimitive.Itemvariant 'default'Selectable row. Accepts `inset` (boolean) and `variant: 'default' | 'destructive'`.
MenubarCheckboxItemMenubarPrimitive.CheckboxItemToggleable item with a check indicator. Controlled via `checked` / `onCheckedChange`.
MenubarRadioGroupMenubarPrimitive.RadioGroupGroups radio items and tracks the selected `value`.
MenubarRadioItemMenubarPrimitive.RadioItemSingle-choice item. Requires a `value` and renders a dot indicator when active.
MenubarLabelMenubarPrimitive.LabelNon-interactive section heading. Accepts `inset` to align with item text.
MenubarSeparatorMenubarPrimitive.SeparatorA thin horizontal divider between groups of items.
MenubarShortcutspanMuted, right-aligned text for displaying a keyboard shortcut hint inside an item.
MenubarSubMenubarPrimitive.SubWraps a nested submenu trigger and content.
MenubarSubTriggerMenubarPrimitive.SubTriggerItem that opens a submenu on hover or arrow key. Accepts `inset` and renders a chevron.
MenubarSubContentMenubarPrimitive.SubContentThe floating panel for a submenu.

Accessibility

  • Built on Radix Menubar, which implements the WAI-ARIA menubar pattern with the correct roles and relationships.
  • Full keyboard support: / move between menus, / move between items, and Esc closes the open menu.
  • Type-ahead lets users jump to an item by typing its label, and focus is trapped within the open menu until it closes.
  • Disabled items set data-disabled, removing pointer events and skipping them in keyboard navigation.