Dropdown menu
A menu of actions behind one trigger. Arrow keys move through the items, Escape closes it and returns focus to the trigger.
bunx --bun shadcn@4.17.0 add @waimakers/dropdown-menu- npm dependencies
- @base-ui/react@1.9.0lucide-react@1.33.0
From the registry
A Base UI menu on the raised surface with the overlay shadow. Arrow keys move between items, skip disabled items and return focus on Escape. Items highlight with the accent wash; variant="destructive" uses danger text at rest and a readable label on a danger fill while highlighted. Link items keep native navigation and close on activation. Supports groups, submenus, checkbox and radio items.
Examples
Actions
Grouped actions with a label, shortcuts, a separator and one destructive item at the end.
Checkboxes
Checkbox items toggle settings without closing the menu.
Radio items
Radio items pick one value from a set, such as a sort order.
Submenu
A submenu holds a second level of choices. Open it with the right arrow.
States
Disabled items are skipped by the arrow keys. The trigger takes the usual focus ring.