Dropdown menu

dropdown-menuActions

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
Kit dependencies
utilstheme
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

Grouped actions with a label, shortcuts, a separator and one destructive item at the end.

Checkbox items toggle settings without closing the menu.

Radio items pick one value from a set, such as a sort order.

A submenu holds a second level of choices. Open it with the right arrow.

Disabled items are skipped by the arrow keys. The trigger takes the usual focus ring.