Skip to main content

Installation

Or use the CLI:

Usage

Component API

The root menubar component built on Radix UI. A single menu within the menubar. The trigger button for a menu. The menu content container. Props:
  • side - Placement side
  • align - Alignment (default: "start")
  • sideOffset - Offset from trigger (default: 8)
  • alignOffset - Alignment offset (default: -4)
An individual menu item. Props:
  • inset - Add left padding
  • variant - "default" or "destructive"
  • disabled - Disable the item
  • onSelect - Callback when selected
A checkbox menu item. Props:
  • checked - Checked state
  • onCheckedChange - Callback when checked state changes
Groups radio items together. Props:
  • value - Selected value
  • onValueChange - Callback when value changes
A radio menu item. Props:
  • value - Item value
Nests a submenu inside a menu item. Triggers a submenu. Props:
  • inset - Add left padding
A non-interactive label. Props:
  • inset - Add left padding
Visual separator between items. Displays keyboard shortcuts.

Examples

Basic

A simple menubar with multiple menus:

Checkbox Items

Use checkbox items for toggles:

Radio Items

Use radio items for exclusive choices:
Nest secondary actions in a submenu:

With Icons

Combine icons with labels:

Complex Example

A full menubar with multiple menus, shortcuts, and submenus:

Accessibility

  • Built on Radix UI for full accessibility
  • Keyboard navigation with arrow keys and Tab
  • Focus management
  • Screen reader compatible
  • ARIA labels and roles
  • Type-ahead search

API Reference

See the Base UI Menubar documentation for complete API details.