Dropdown menuNew
Actions behind a button: the menu rises off the trigger, one highlight glides between rows, and checkbox rows draw their tick in place.
Used forRow actionsAccount menusView optionsCreate menus
Install with the shadcn CLI
Older shadcn CLI, or a network that blocks ui.shadcn.com? Install by URL: shadcn add https://hairlineui.com/r/dropdown-menu.json. More
Used in 2 blocks
All blocks- SidebarThe app sidebar, ready to use: workspace switcher, search, counts, groups and account. Drag its edge to resize it or fold it into a rail where no icon moves.
- Page headerThe top of every app page: breadcrumbs, title, status, actions and tabs. As you scroll, the title glides up and shrinks into a sticky bar.
Templates
Need the whole page?
65 Next.js landing pages, each designed from scratch. Try any of them live; one is $39, all of them $159, and 8 are free.
Where it’s used
Row actions
Edit, duplicate, delete on a "…" button.
Account menus
Profile, settings, sign out under an avatar.
View options
Checkable columns or display settings.
Create menus
New doc, new folder, upload.
What it handles for you
Menus need roving focus, typeahead, Home/End and focus return; the gliding highlight is what makes it feel made rather than assembled.
Gliding highlight
One fill moves between rows (220ms) for pointer and keys alike.
Keyboard
Enter/Space/↓ open on the first row, ↑ on the last; arrows wrap; typing jumps.
Checkable rows
A drawn tick, aria-checked, menu stays open.
Plain data
items: rows, labels and separators as objects.
Overview
Menus usually repaint each row's background as you move, so the highlight blinks from row to row. Here one highlight glides, typing jumps to a row, checkbox rows draw their tick and keep the menu open, and destructive rows are red. It rises off its trigger and flips above when there is no room.
States
- open
- Rises off the trigger (320ms); flips above if needed.
- move
- The highlight glides to the row under the pointer or the key.
- pick
- Closes (180ms) and focus returns to the trigger; checkbox rows stay open and draw their tick (280ms).
Usage
Depends on lucide-react, installed for you by the CLI along with the keyframes it needs.
Works with
Built on it
- SidebarThe app sidebar, ready to use: workspace switcher, search, counts, groups and account. Drag its edge to resize it or fold it into a rail where no icon moves.
- Page headerThe top of every app page: breadcrumbs, title, status, actions and tabs. As you scroll, the title glides up and shrinks into a sticky bar.
Props
- trigger
- ReactElement
- The button that opens it.
- items
- MenuEntry[]
- Rows ({ id, label, icon, shortcut, destructive, disabled, onSelect }), { type: "checkbox", checked, onCheckedChange }, { type: "label" } and { type: "separator" }.
- side / align= "bottom" / "start"
- Side / Align
- Where it sits.
- open / onOpenChange
- boolean / (open) => void
- Control it.
- minWidth= 200
- number
- Never narrower than the trigger.
- label
- string
- Accessible name of the menu.
Accessibility and motion
- Placement, presence and dismissal live in floating.ts, shared by tooltip, popover, dropdown and context menus: they all flip, shift, enter and leave the same way.
- role="menu" with menuitem and menuitemcheckbox rows.
- Reduced motion: the menu fades; the highlight jumps.
Requirements
React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.
Source
Registry item: /r/dropdown-menu.json


