Dropdown Menu
A composable dropdown menu built on Base UI's Menu primitive, providing a trigger-controlled popup with support for items, checkboxes, radio groups, submenus, separators, and keyboard shortcuts.
Default
Disabled
With Checkboxes
With Icons
With Radio
With Shortcuts
With Submenu
Installation
npx shadcn@latest add @byronwade/dropdown-menuProps
| Prop | Type | Default | Description |
|---|---|---|---|
| open | boolean | — | Controls the open state of the menu (controlled mode). |
| defaultOpen | boolean | — | The initial open state when uncontrolled. |
| onOpenChange | (open: boolean) => void | — | Callback fired when the open state changes. |
| modal | boolean | true | Whether the menu should behave as a modal (trap focus). |