Skip to main content

Installation

Or use the CLI:

Usage

Component API

The root dropdown menu component built on Radix UI. Props:
  • open - Control menu open state
  • onOpenChange - Callback when open state changes
  • defaultOpen - Initial open state
  • modal - Whether menu is modal (default: true)
The element that opens the dropdown menu. Props:
  • asChild - Compose with child element
The menu content container. Props:
  • side - Placement side (default: "bottom")
  • align - Alignment (default: "start")
  • sideOffset - Offset from trigger (default: 4)
An individual menu item. Props:
  • inset - Add left padding (for alignment with checkboxes)
  • variant - "default" or "destructive"
  • disabled - Disable the item
  • onSelect - Callback when selected
A checkbox menu item. Props:
  • checked - Checked state (boolean or "indeterminate")
  • 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 dropdown menu with labels and separators:
Nest secondary actions in a submenu:

Shortcuts

Add keyboard shortcuts to menu items:

With Icons

Combine icons with labels:

Checkboxes

Use checkbox items for toggles:

Radio Group

Use radio items for exclusive choices:

Destructive

Use variant="destructive" for irreversible actions:

Avatar Trigger

Trigger dropdown from an avatar:

Accessibility

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

API Reference

See the Base UI Menu documentation for complete API details.