Skip to main content

Overview

Print⌘P
Menubar is a horizontal menu bar — the same pattern found in desktop applications like VS Code, Chrome, and Figma. It exposes top-level menus (File, Edit, View) that open dropdown panels on click.

Installation


Usage


API Reference

boolean
default:"false"
Disables the item.
() => void
Callback fired on selection. Menu closes automatically.
boolean
Controlled checked state.
(checked: boolean) => void
Callback when checked state changes.
string
Selected radio value (on group) or item value.
(value: string) => void
Callback when radio selection changes.

Accessibility

  • Menubar uses role="menubar" with aria-orientation="horizontal"
  • Each MenubarMenu trigger has role="menuitem" and aria-haspopup="menu"
  • Keyboard: Left/Right arrows move between top-level triggers; Down/Enter opens the dropdown; Escape closes
  • When a menu is open, Up/Down navigate items and Left/Right move to adjacent top-level menus

Do’s & Don’ts

Do

  • Use Menubar for desktop-class web applications (editors, dashboards, IDEs)
  • Include keyboard shortcuts in MenubarShortcut to match native app conventions
  • Group related actions with MenubarSeparator and MenubarLabel
  • Limit top-level menus to 4–6 items

Don't

  • Don’t use Menubar on mobile-first products — use a bottom sheet or hamburger menu
  • Don’t duplicate the same actions in both Menubar and a Toolbar — pick one
  • Don’t use for simple single-level navigation — use Tabs or Sidebar
  • Don’t nest sub-menus more than 2 levels deep