DropdownMenu
A menu of actions hanging off a trigger — reach for Select when the reader is choosing a value for a form, since a menu runs commands rather than holding an answer. Leave the primary action visible as a Button and put only the secondary ones in here; past roughly ten items, group them or move them somewhere with room.
Usage
Examples
Context
DropdownMenuContextTrigger opens the same menu on right-click, and
DropdownMenuTriggerItem nests a submenu inside it. Always leave a left-click route to the same
actions — a right-click-only affordance is undiscoverable.
With descriptions
DropdownMenuItemContent pairs DropdownMenuItemText with
DropdownMenuItemDescription for a second line. Descriptions make a menu tall quickly, which is
when separators start doing real work.
With icons
DropdownMenuItemIcon sits before the label. Icon every item in a group or none of
them — a half-iconned list reads as though some items are missing theirs.
With footer
DropdownMenuFooter bleeds to the panel edge under a divider and renders at secondary
emphasis, so it suits a persistent link or count rather than an action competing with the items.
With description and icons
Icons and descriptions together, which is the widest an item gets. Past this the
menu is doing a panel's job — reach for a Popover.
With checkbox items
DropdownMenuCheckboxItem for options that aren't mutually exclusive. Selecting one
leaves the menu open, so several can be toggled in a single visit.
With radio group
DropdownMenuRadioGroup for one-of-many. It also stays open on select, so the reader
sees the indicator move before dismissing it themselves.
With mixed selection items
Commands, checkboxes and a radio group in one menu. DropdownMenuLabel and
DropdownMenuSeparator are what keep the three kinds from reading as one flat list.