DropdownMenu
A contextual menu that reveals a list of actions or options when its trigger is activated.
Uses role="menu" / role="menuitem"; keyboard navigable with arrow keys; Esc closes; focus returns to trigger.
Variants
Section titled “Variants”With icons
Section titled “With icons”Add a leading icon to any DropdownMenuItem via the icon prop.
With shortcuts
Section titled “With shortcuts”Render keyboard shortcut hints using DropdownMenuShortcut. Each character is wrapped in a Kbd keycap automatically.
Checkbox and radio items
Section titled “Checkbox and radio items”Use DropdownMenuCheckboxItem for toggleable items and DropdownMenuRadioItem inside a DropdownMenuRadioGroup for mutually exclusive selections.
PropTypeDefaultDescription
container
HTMLElement|(() => HTMLElement)
—
className
string
—
Accessibility
Section titled “Accessibility”- The menu follows the ARIA Menu Button pattern:
role="menu"on the content,role="menuitem"on each item. - Arrow keys navigate between items;
Home/Endjump to first / last item. - Pressing
Esccloses the menu and returns focus to the trigger. DropdownMenuCheckboxItemcarriesrole="menuitemcheckbox";DropdownMenuRadioItemcarriesrole="menuitemradio".DropdownMenuShortcutisaria-hidden="true"— decorative only, not announced.
Recipes
Section titled “Recipes”- Use
DropdownMenuSub+DropdownMenuSubTrigger+DropdownMenuSubContentfor nested sub-menus. - Use
DropdownMenuTrigger asChildinstead ofDropdownMenuTriggerButtonto compose with any custom trigger element. - Add
descriptionto any item for a muted second line of context below the label. - Use
variant="danger"on destructive items for red highlight styling.