Overview
Profile
Settings
⌘S
Log out
Installation
Usage
Variants
Basic with Icons and Shortcuts
My account
Log out
⇧⌘Q
With Checkbox Items
Appearance
With Sub-menu
Edit
Duplicate
Share
API Reference
DropdownMenu
boolean
Controlled open state.
(open: boolean) => void
Callback fired when open state changes.
boolean
default:"false"
Uncontrolled default open state.
DropdownMenuContent
string
default:"start"
Horizontal alignment relative to the trigger. Values:
start · center · endstring
default:"bottom"
Which side to render on. Values:
top · right · bottom · leftnumber
default:"4"
Distance in px between the trigger and the menu.
string
Additional class names for the menu panel.
DropdownMenuItem
string
default:"default"
Visual style.
"destructive" renders item in red.boolean
default:"false"
Disables the item — it becomes non-interactive and grayed out.
() => void
Callback fired when the item is selected. Menu closes automatically.
DropdownMenuCheckboxItem
boolean
Controlled checked state.
(checked: boolean) => void
Callback fired when checked state changes.
Accessibility
- Dropdown menu uses
role="menu"witharia-orientation="vertical" - Each item has
role="menuitem"(or"menuitemcheckbox"/"menuitemradio") - Trigger has
aria-haspopup="menu"andaria-expanded - Keyboard: Arrow keys navigate items, Enter/Space selects, Escape closes, Tab closes and moves focus
- Sub-menus open on ArrowRight and close on ArrowLeft or Escape
Do’s & Don’ts
Do
- Group related actions with
DropdownMenuSeparator - Use
DropdownMenuLabelto label groups of items - Add keyboard shortcuts via
DropdownMenuShortcutfor power users - Mark destructive items with
variant="destructive"for visual clarity
Don't
- Don’t use Dropdown Menu for navigation — use a Navbar or Sidebar
- Don’t put more than 10–12 items without grouping or sub-menus
- Don’t use it for single-action triggers — use a Button
- Don’t nest sub-menus more than 2 levels deep