UI
ContextMenu
Right-click context menu with items, separators, labels, keyboard shortcuts, and checkmarks.
Quick Preview
Installation
npm install @radix-ui/react-context-menu
// Copy component fromsrc/components/ui/ContextMenu.tsx
Usage
import ContextMenu from '@/components/ui/ContextMenu'<ContextMenuitems={[{ label: 'Copy', onClick: handleCopy },{ label: 'Delete', onClick: handleDelete, variant: 'danger' },]}><div>Right-click me</div></ContextMenu>
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items* | ContextMenuItem[] | - | Menu item definitions |
children* | React.ReactNode | - | Trigger element (right-click area) |