Design System
Navigation

Menubar

A horizontal application menu bar. Rare in the product UI; it exists for dense internal tools that expect desktop conventions.

Purpose

A menubar is a row of persistent top-level menus — File, Edit, View — with full arrow-key roving between them, the way a desktop application behaves. It earns its place only in editor-like internal tools where people expect those conventions.

Most portal screens should not use it: the standard pattern is Topbar navigation with a Dropdown menu per trigger. Reach for Menubar when the screen is the tool — a claims batch editor, a canvas — not when it merely has a few actions.

Application menus

Each MenubarMenu pairs one trigger with one panel. Panels share the dropdown menu's styling, including destructive items and disabled items.

MenubarShortcut is display only — it renders the hint text and registers nothing. Bind the actual key handler yourself, and only show a shortcut that works.

Put a Kbd inside the slot rather than literal glyphs: it resolves the modifier per platform, so the same markup reads ⌘N on a Mac and Ctrl+N on Windows. Bind it with e.metaKey || e.ctrlKey to match.

Structure

PropertyValue
Bar40px tall, --background fill, 1px --border, --shadow-1, --radius-md
Bar padding4px inner padding, 4px gap between triggers
Trigger14px / Inter 500, 12px × 6px padding, --radius-sm; open/focus --accent
Panel--popover with 1px --border and --shadow-8, --radius-lg, min 192px, 4px inner padding
Item14px text, 8px × 6px padding, focus --accent
Destructive item--destructive-text ink, focus --destructive-subtle fill
Shortcut hint12px, wide tracking, --muted-foreground
Placement8px below the trigger, aligned to its start; fade + zoom entrance

Best practices

Do

  • Group items by task the way desktop apps do — File, Edit, View — so the muscle memory transfers.
  • Keep every menu usable from the keyboard alone; that is the whole point of the pattern.
  • Show a MenubarShortcut only for shortcuts you have actually bound.
  • Put destructive items last, after a separator, and mark them destructive.

Don't

  • Use a menubar as site navigation — that is Topbar's job.
  • Reach for it when one button's worth of actions would do; use a Dropdown menu.
  • Mix navigation links and commands in the same menu.
  • Hide a screen's only primary action inside a menu.

Accessibility & keyboard

  • The bar renders role="menubar" with each trigger as a menuitem — the full WAI-ARIA menubar pattern, provided by Radix.
  • Keyboard: Left/Right arrows move across the top-level triggers; Down, Enter or Space opens the focused menu; Up/Down move between items; Left/Right also move to the adjacent menu while one is open; Esc closes and returns focus to the trigger.
  • Type-ahead jumps to the first item matching the typed letters.
  • Disabled items are skipped by arrow navigation and not activatable.

Props

Every part wraps its Radix Menubar primitive and passes all of that primitive's props through — Menubar accepts value/onValueChange for controlled use, and MenubarItem adds one prop of its own: destructive. There is no separate props interface to document.

Every Menubar part and prop in Storybook

On this page