Overlays

DropdownMenu

A list of actions launched from a button, with separators, shortcuts and checkable items.

Importimport { DropdownMenu } from "@/components/ui/DropdownMenu";
Sourcesrc/components/ui/DropdownMenu

A list of actions. Group related items with DropdownMenuSeparatorand put destructive actions last, separated — so the item next to “Delete” is never something you meant to click.

Default

Labels, items, checkable items, separators and shortcut chips. DropdownMenuShortcut takes keys as an array so each key renders as its own chip.

Props

DropdownMenu

PropTypeDefaultDescription
openbooleanControlled open state.
defaultOpenbooleanUncontrolled initial state.
onOpenChange(open: boolean) => voidCalled whenever it opens or closes.

DropdownMenuContent

PropTypeDefaultDescription
sideFloatingSidePreferred side.
alignFloatingAlignstart, center or end.
sideOffsetnumberGap between trigger and menu.

DropdownMenuItem

PropTypeDefaultDescription
disabledbooleanSkipped by keyboard navigation.
insetbooleanIndents to align with items that have a check or icon.
onSelect(event: MouseEvent<HTMLDivElement>) => voidFires when the item is chosen.