Kanshō/Context Menu

Context Menu

Right-click menu for dense secondary actions, grouped commands, nested choices, shortcuts, disabled actions, and checked items.

Included in the single kansho full pack. Components are not offered as separate installs.

Menu patterns

Grouped actions

Agent output card with file and run actions.

run-10422 files changed

Nested actions

Secondary commands stay tucked away until needed.

run-10422 files changed

Checked items

Persistent menu state for view options.

run-10422 files changed

Static reference

Open state styling
Mark complete⌘↵
Export log
Delete run

Component documentation

Context Menu

components/ui/context-menu.tsx

Purpose

Provides a composable right-click menu with nested, checkbox, and radio actions.

Appropriate use

Use for secondary actions whose context is clear from the trigger surface; keep essential actions available elsewhere.

Example

components/ui/context-menu.tsx has a representative live example in the "Menu patterns" section on /components/context-menu.

States

Supports open and closed content, highlighted and disabled items, destructive items, checked items, radio selection, and submenus.

API and props

ContextMenu exposes Root, Trigger, Content, Item, CheckboxItem, RadioItem, RadioGroup, Group, Label, Separator, Shortcut, Sub, SubTrigger, and SubContent using Radix prop contracts.

Dependencies

React, Radix Context Menu, Lucide icons, and the Kansho cn utility.

Accessibility

Radix supplies focus management, roving keyboard navigation, menu roles, checked states, and submenu behaviour; motion is removed for reduced-motion users.

Limitations

Right-click discovery is weak on touch and keyboard, so it must not be the only path to critical actions.

Source

Source: components/ui/context-menu.tsx.

Full pack

components/ui/context-menu.tsx is documented at /components/context-menu and installs only through the single Kansho full pack; no individual component install is offered.