DropdownMenu
Menu of actions or options, opened from a trigger. Supports nested submenus,
checkbox/radio items, separators, and keyboard shortcuts. Open state is
uncontrolled by default; pass open/onOpenChange to control it.
Usage
import { DropdownMenu, dropdownMenuAnatomy, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "@desk/ui/components/dropdown-menu";Best practices
Use
DropdownMenufor a menu opened by clicking a trigger; a right-click / long-press menu is aContextMenu.It's an actions / options menu, not a form control — to choose a value use
Select(styled) orCombobox(searchable), not menu rows.Reach for
DropdownMenuCheckboxItem/DropdownMenuRadioItemfor stateful rows;DropdownMenuContentportals to the body.
Props
DropdownMenuCheckboxItem
| Prop | Type | Default | Description |
|---|---|---|---|
| children | string | number | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Text label. Use |
DropdownMenuContent
| Prop | Type | Default | Description |
|---|---|---|---|
| size | "base" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | ||
| itemRadius | "rounded" | "square" | "full" | Border radius for menu items. When "full", items become pill-shaped. | |
| surface | MenuSurface | Surface density. Compact maps to the 16px-radius, 4px-padding menu surface. | |
| contentWidth | MenuContentWidth | Named content widths from the design system. | |
| overflow | MenuOverflow | Outer content overflow behavior. Use hidden when a child owns scrolling. |
DropdownMenuItem
| Prop | Type | Default | Description |
|---|---|---|---|
| inset | boolean | ||
| tone | "neutral" | "danger" | ||
| avatar | React.ReactNode | ||
| dot | boolean | "neutral" | "brand" | "danger" | "warning" | "success" | "info" | Dot indicator at the start (takes precedence over icon): | |
| icon | LucideIcon | React.ComponentType<React.SVGProps<SVGSVGElement>> | ||
| suffixIcon | LucideIcon | React.ComponentType<React.SVGProps<SVGSVGElement>> | ||
| kbd | string[] | ||
| suffix | React.ReactNode | ||
| active | boolean | Whether the item is in an active/selected state | |
| activeIndicator | "none" | "dot" | "check" | Visual indicator for active state. "dot" shows grey dot normally, green when active. "check" shows green checkmark only when active. | |
| children | string | number | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Text label. Use |
DropdownMenuLabel
| Prop | Type | Default | Description |
|---|---|---|---|
| inset | boolean |
DropdownMenuRadioItem
| Prop | Type | Default | Description |
|---|---|---|---|
| children | string | number | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Text label. Use |
DropdownMenuSeparator
| Prop | Type | Default | Description |
|---|---|---|---|
| spacing | DropdownMenuSeparatorSpacing |
DropdownMenuSubContent
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | ||
| size | "base" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl" | ||
| children | ReactNode |
DropdownMenuSubTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
| inset | boolean | ||
| icon | LucideIcon | React.ComponentType<React.SVGProps<SVGSVGElement>> | ||
| children | string | number | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Text label. Use |
Also exports
- component
DropdownMenu - const
dropdownMenuAnatomy - component
DropdownMenuGroup - component
DropdownMenuPortal - component
DropdownMenuRadioGroup - component
DropdownMenuShortcut - component
DropdownMenuSub - component
DropdownMenuTrigger
Anatomy
DropdownMenu
dropdown-menuDropdown menu triggered by a button
DropdownMenuTrigger
dropdown-menu-triggerButton that opens menu
DropdownMenuContent
dropdown-menu-contentMenu content container
DropdownMenuItem
dropdown-menu-itemMenu item
DropdownMenuCheckboxItem
dropdown-menu-checkbox-itemToggleable item
DropdownMenuRadioGroup
dropdown-menu-radio-groupExclusive selection group
DropdownMenuRadioItem
dropdown-menu-radio-itemRadio option
DropdownMenuLabel
dropdown-menu-labelSection label
DropdownMenuSeparator
dropdown-menu-separatorVisual divider
DropdownMenuSub
dropdown-menu-subNested submenu
DropdownMenuSubTrigger
dropdown-menu-sub-triggerOpens nested menu
DropdownMenuSubContent
dropdown-menu-sub-contentNested menu container
DropdownMenuShortcut
dropdown-menu-shortcutKeyboard shortcut