Context Menu

Secondary actions for an element that appear on right-click or a long press.

UI SkillbookSiteplane docsSiteplane UI 1.8.1
Works withClaude CodeCodexCursorOpenCodeUniversal
Install

Run npx uiskillbook get siteplane-context-menu and follow the Siteplane Context Menu skill it prints for this task.

Paste this into your agent.

Context Menu offers quick actions on an item people work with in place, such as a file, a canvas object or a row. It shares Menu's look and parts. Treat it as a shortcut: many people never think to right-click.

Install

bashnpx shadcn@4.18.0 add @siteplane/context-menu

Import it from @/siteplane/components/context-menu. The project needs Siteplane UI's one-time setup first: installation.

When to pick it

  • vs Menu: Also offer a visible Menu button for the same actions so people who never right-click can still reach them.
  • vs Dropdown Menu: Pick Dropdown Menu instead when the menu opens from a visible button rather than from the element itself.
  • vs Command: Pick Command instead when people search a large set of actions by typing.

Rules

  • Never make the context menu the only path to an action; mirror it in a visible control.
  • Use ContextMenuLinkItem for items that navigate. It renders a real anchor and closes the menu when activated.
  • ContextMenuPopup includes the portal and positioner, so don't wrap it in another portal.
  • Group related items with ContextMenuGroup and ContextMenuGroupLabel, and move rare actions into a submenu.
  • Checkbox and radio items hold menu state and do not submit with a form.

Reference

  • Context Menu docs, with every prop, part and example (Markdown)
  • Siteplane UI 1.8.1, Overlays & disclosure. Read the installed source under src/siteplane before relying on an API.

Add to your agent

Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides

CLI

npx uiskillbook get siteplane-context-menu

MCP server

https://www.uiskillbook.com/mcp

Questions