Dropdown Menu

Installation

$npx shadcn-macos@latest add dropdown

Examples

Props

<DropdownMenu />
PropTypeDefaultDescription
trigger*React.ReactNode—Element that triggers opening the menu when clicked.
items*Array<{ id: string; label: string; icon?: React.ReactNode; shortcut?: string; destructive?: boolean; onClick?: () => void } | "separator">—Array of menu item actions and separators.
align"start" | "center" | "end""end"Horizontal alignment relative to the trigger button.
classNamestring—Custom CSS class names.