Component
ContextMenu
Reveals a menu of actions on right-click or long-press.
Install
Run the CLI to copy the source into your project.
pnpm dlx @stalk-ui/cli add @stalk-ui/context-menuExamples
Live previews render through the docs app's PandaCSS codegen.
<ContextMenu> <ContextMenu.Trigger>Right click here</ContextMenu.Trigger> <ContextMenu.Content> <ContextMenu.Item>Cut</ContextMenu.Item> <ContextMenu.Item>Copy</ContextMenu.Item> <ContextMenu.Separator /> <ContextMenu.Item>Paste</ContextMenu.Item> </ContextMenu.Content> </ContextMenu>
Props
Public component props extracted from the source TypeScript types.
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
| `container` | `HTMLElement \ | null` | No | - |
| Prop | Type | Required | Default | Description |
| `inset` | `boolean` | No | - | Reserves indicator space so the item aligns with checkbox/radio items. |
| Prop | Type | Required | Default | Description |
| `inset` | `boolean` | No | - | - |
Variants
Variant axes exposed by the underlying PandaCSS recipe or slot recipe.
| Variant | Values |
|---|---|
| `inset` | `true`, `false` |
Registry
Files this component contributes to your registry install.
- Manifest: `/r/context-menu.json`
- Recipe: `contextMenu`
- Files: `src/components/ui/context-menu.tsx`