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-menu

Props

PropTypeDefaultDescription
openbooleanControls the open state of the menu (controlled mode).
defaultOpenbooleanThe initial open state when uncontrolled.
onOpenChange(open: boolean) => voidCallback fired when the open state changes.
modalbooleantrueWhether the menu should behave as a modal (trap focus).