Menu

A list of actions in a dropdown, enhanced with keyboard navigation.

Usage

API Reference

Root component. Also exported as DropdownMenu.

Trigger button that opens the menu. Also exported as DropdownMenuTrigger.

Popup container that displays the menu content. Also exported as DropdownMenuContent.

Groups related menu items. Also exported as DropdownMenuGroup.

Individual menu item. Also exported as DropdownMenuItem.

Using inset: When mixing items with and without icons, use inset on icon-less items to maintain alignment:

Link menu item for navigation. LinkItem renders a native <a> when you pass href. Styled like MenuItem.

If you were using MenuItem render={<Link href="..." />}, migrate to MenuLinkItem but keep render — do not replace it with href alone when using a router Link.

Use href only for plain anchor links:

Checkbox menu item. Also exported as DropdownMenuCheckboxItem.

Groups radio menu items. Also exported as DropdownMenuRadioGroup.

Radio menu item. Also exported as DropdownMenuRadioItem.

Label for a menu group. Also exported as DropdownMenuLabel.

Visual separator between menu items. Also exported as DropdownMenuSeparator.

Displays keyboard shortcut text. Custom component. Also exported as DropdownMenuShortcut.

Submenu container. Also exported as DropdownMenuSub.

Trigger for opening a submenu. Also exported as DropdownMenuSubTrigger.

Popup for submenu content. Also exported as DropdownMenuSubContent.

Examples

Open on Hover

With Checkbox

With Switch

MenuCheckboxItem supports a variant="switch" prop that displays a decorative switch indicator instead of a checkmark. This is a purely visual variant - the component remains a checkbox item with the same functionality.

With Radio Group

With Group Label

Nested Menu

Close on Click

Open a Dialog