A button that opens a list of actions. Can hold a profile header and info rows.
moleculeOverlays
Default
A button that opens a short list of actions with icons and shortcuts.
Installation
Copies the component into src/design-system/ as your own source, with only the files it needs.
npx avesk-ui@latest add dropdown-menu
Copy code
Brings the 4 files it builds on (button.tsx, glyph.tsx, icon.tsx, floating.tsx). The first time, it also adds the tokens and the cn() helper, imports the tokens in globals.css and installs clsx and tailwind-merge. Files already in your project are kept unless you add --force.
Import
Lives in src/design-system/components/dropdown-menu.tsx.
Group with labels when there are more than ~6 items
The menu opens below the trigger, or above when there's no room, in the top layer so no scrolling parent crops it (useFloating); it fades in over 200ms ease-smooth
Properties
MenuProfile
Prop
Type
Default
avatar *
ReactNode
–
name *
string
–
detail
string
–
badge
ReactNode
–
MenuInfoRow
Prop
Type
Default
title *
string
–
description
string
–
action
ReactNode
–
DropdownMenu
Prop
Type
Default
label *
ReactNode
–
aria-label
string
–
items *
DropdownMenuEntry[]
–
align
"start" | "end"
"start"
variant
ButtonVariant
"secondary-gray"
size
ButtonSize
"md"
iconOnly
boolean
false
defaultOpen
boolean
false
className
string
–
* required
Accessibility
role="menu"; arrows, Home, End; Escape returns focus to the trigger