Skip to content

Dropdown Menu

Navigation

Context menu with items, separators, and keyboard navigation.

Action itemsCheckbox itemDisabled itemShortcut hint
Open preview

Responsive viewport — resize the window to explore. Direction and density apply only to this preview. Theme applies to the docs too.

Usage

Use menus for actions, checkable settings, and grouped commands. Handle onSelect on menu items. Displayed shortcuts are visual hints; register keyboard shortcuts separately if needed.

Import
import {
  DropdownMenu,
  DropdownMenuTrigger,
  DropdownMenuContent,
  DropdownMenuLabel,
  DropdownMenuSeparator,
  DropdownMenuItem,
  DropdownMenuCheckboxItem,
  DropdownMenuShortcut,
} from "@dashboardpack/core/components/ui/dropdown-menu";

Available in the included @dashboardpack/core package. Copy the complete example from Source code for all imports and state. Add "use client" when using hooks or event handlers. See installation and theming for project setup.

API reference

Common props and defaults. Slot-specific props are named below; native elements also accept their standard HTML attributes. The component TypeScript definitions are the complete type reference.

Dropdown Menu props
PropType / DefaultDescription
onSelect (DropdownMenuItem)(event: Event) => void

Default: —

Respond to an action selection.
checked / onCheckedChange (CheckboxItem)boolean | "indeterminate" / callback

Default: —

Control a checkable menu item.
disabled (DropdownMenuItem)boolean

Default: false

Prevent selection.
align (DropdownMenuContent)start | center | end

Default: center

Popup alignment.

Build with these too