Context Menu

Installation

$npx shadcn-macos@latest add context-menu

Examples

Right-click this area

Props

<ContextMenu />
PropTypeDefaultDescription
trigger*React.ReactNode—Element that opens the menu on right-click.
items*Array<{ id: string; label: string; icon?: React.ReactNode; shortcut?: string; destructive?: boolean; disabled?: boolean; onClick?: () => void } | "separator">—Array of menu item actions and separators.
classNamestring—Custom CSS class names.