Context Menu
Installation
$npx shadcn-macos@latest add context-menu
Examples
Right-click this area
Props
<ContextMenu />| Prop | Type | Default | Description |
|---|---|---|---|
| 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. |
| className | string | — | Custom CSS class names. |