Dropdown Menu
A menu of actions and options that opens from the button holding it, one row to each.
Usage
Examples
Tones
tone on an item is neutral by default, or destructive, its words in the destructive colour and its highlight tinted, for an action that cannot be undone.
Sizes
size steps the rows with their words and icons, and the labels, shortcuts and ticks with them, at the same width: sm 28px rows with 12px words, base 32px rows with 14px words (the default) or lg 40px rows with 16px words on a phone and 14px from 640px; a submenu takes its menu's size, and each button opens its own menu.
Border radius
borderRadius sets the menu's corners on the kit's one scale: none, xs 4px, sm 6px, base 8px, lg 12px (the default) or xl 16px, its rows keeping inside them; each button opens its own menu.
With icon
An Icon before an item's words is drawn at the row's icon size, in the row's colour.
Shortcuts
DropdownMenuShortcut writes an item's keyboard shortcut at its end.
Description
description sets a second, quieter line under an item's words, beside an item as it is by default.
Actions
actions sets small Buttons over the end of an item, which close the menu once used, beside an item as it is by default.
Inset
inset indents an item, a label or a sub-trigger so its words line up with the checkbox and radio items', beside an item as it is by default.
Checkbox item
DropdownMenuCheckboxItem is ticked through checked, true or indeterminate for a dash, and unticked by default.
Radio item
DropdownMenuRadioItems in a DropdownMenuRadioGroup hold one value between them, a dot marking the item that has it.
Groups
DropdownMenuGroup gathers items under a DropdownMenuLabel, and a DropdownMenuSeparator draws a line between groups.
Loading
loading draws three skeleton rows in place of the items while they load, where by default the items show.
Loading more
loadingMore keeps the items and draws two skeleton rows under them while the next page of a long list loads.
Disabled
disabled dims an item and skips it in the arrow keys, beside an item as it is by default.
API Reference
DropdownMenu
DropdownMenuProps · components/DropdownMenu/DropdownMenu.types.tsDropdownMenuPortal
DropdownMenuPortalProps · takes the props of Radix DropdownMenu.PortalDropdownMenuTrigger
DropdownMenuTriggerProps · takes the props of Radix DropdownMenu.TriggerDropdownMenuContent
DropdownMenuContentProps · also takes the props of Radix DropdownMenu.ContentDropdownMenuGroup
DropdownMenuGroupProps · takes the props of Radix DropdownMenu.GroupDropdownMenuLabel
DropdownMenuLabelProps · also takes the props of Radix DropdownMenu.LabelDropdownMenuItem
DropdownMenuItemProps · also takes the props of Radix DropdownMenu.ItemDropdownMenuCheckboxItem
DropdownMenuCheckboxItemProps · also takes the props of ComponentProps< typeof CheckboxItem >DropdownMenuRadioGroup
DropdownMenuRadioGroupProps · takes the props of Radix DropdownMenu.RadioGroupDropdownMenuRadioItem
DropdownMenuRadioItemProps · also takes the props of ComponentProps< typeof RadioItem >DropdownMenuSeparator
DropdownMenuSeparatorProps · takes the props of Radix DropdownMenu.SeparatorDropdownMenuShortcut
DropdownMenuShortcutProps · takes the props of <span>DropdownMenuSub
DropdownMenuSubProps · takes the props of Radix DropdownMenu.SubDropdownMenuSubTrigger
DropdownMenuSubTriggerProps · also takes the props of ComponentProps< typeof SubTrigger >DropdownMenuSubContent
DropdownMenuSubContentProps · also takes the props of ComponentProps< typeof SubContent >It also takes the props of Radix DropdownMenu.Root.