Skip to content
← Inventory

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.

Material

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 DropdownMenu for a menu opened by clicking a trigger; a right-click / long-press menu is a ContextMenu.

  • It's an actions / options menu, not a form control — to choose a value use Select (styled) or Combobox (searchable), not menu rows.

  • Reach for DropdownMenuCheckboxItem / DropdownMenuRadioItem for stateful rows; DropdownMenuContent portals to the body.

Props

DropdownMenuCheckboxItem

PropTypeDefaultDescription
childrenstring | number | React.ReactElement<unknown, string | React.JSXElementConstructor<any>>

Text label. Use icon prop for icons, not children. When using asChild, pass a single React element.

DropdownMenuContent

PropTypeDefaultDescription
size"base" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl"
itemRadius"rounded" | "square" | "full"

Border radius for menu items. When "full", items become pill-shaped.

surfaceMenuSurface

Surface density. Compact maps to the 16px-radius, 4px-padding menu surface.

contentWidthMenuContentWidth

Named content widths from the design system.

overflowMenuOverflow

Outer content overflow behavior. Use hidden when a child owns scrolling.

DropdownMenuItem

PropTypeDefaultDescription
insetboolean
tone"neutral" | "danger"
avatarReact.ReactNode
dotboolean | "neutral" | "brand" | "danger" | "warning" | "success" | "info"

Dot indicator at the start (takes precedence over icon): true for a neutral dot, or a {@link Tone} to tint it.

iconLucideIcon | React.ComponentType<React.SVGProps<SVGSVGElement>>
suffixIconLucideIcon | React.ComponentType<React.SVGProps<SVGSVGElement>>
kbdstring[]
suffixReact.ReactNode
activeboolean

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.

childrenstring | number | React.ReactElement<unknown, string | React.JSXElementConstructor<any>>

Text label. Use icon prop for icons, not children. When using asChild, pass a single React element.

DropdownMenuLabel

PropTypeDefaultDescription
insetboolean

DropdownMenuRadioItem

PropTypeDefaultDescription
childrenstring | number | React.ReactElement<unknown, string | React.JSXElementConstructor<any>>

Text label. Use icon prop for icons, not children. When using asChild, pass a single React element.

DropdownMenuSeparator

PropTypeDefaultDescription
spacingDropdownMenuSeparatorSpacing

DropdownMenuSubContent

PropTypeDefaultDescription
classNamestring
size"base" | "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "3xl"
childrenReactNode

DropdownMenuSubTrigger

PropTypeDefaultDescription
insetboolean
iconLucideIcon | React.ComponentType<React.SVGProps<SVGSVGElement>>
childrenstring | number | React.ReactElement<unknown, string | React.JSXElementConstructor<any>>

Text label. Use icon prop for icons, not children. When using asChild, pass a single React element.

Also exports

  • componentDropdownMenu
  • constdropdownMenuAnatomy
  • componentDropdownMenuGroup
  • componentDropdownMenuPortal
  • componentDropdownMenuRadioGroup
  • componentDropdownMenuShortcut
  • componentDropdownMenuSub
  • componentDropdownMenuTrigger

Anatomy

DropdownMenu

dropdown-menu

Dropdown menu triggered by a button

DropdownMenuTrigger

dropdown-menu-trigger

Button that opens menu

DropdownMenuContent

dropdown-menu-content

Menu content container

DropdownMenuItem

dropdown-menu-item

Menu item

DropdownMenuCheckboxItem

dropdown-menu-checkbox-item

Toggleable item

DropdownMenuRadioGroup

dropdown-menu-radio-group

Exclusive selection group

DropdownMenuRadioItem

dropdown-menu-radio-item

Radio option

DropdownMenuLabel

dropdown-menu-label

Section label

DropdownMenuSeparator

dropdown-menu-separator

Visual divider

DropdownMenuSub

dropdown-menu-sub

Nested submenu

DropdownMenuSubTrigger

dropdown-menu-sub-trigger

Opens nested menu

DropdownMenuSubContent

dropdown-menu-sub-content

Nested menu container

DropdownMenuShortcut

dropdown-menu-shortcut

Keyboard shortcut