On this page

Context menu

When to use a context menu, its parts, content and tokens.

Draft. Ported from the shadcn-vue ContextMenu (registry style reka-nova, read 12 November 2026) and styled with Beehexa tokens. Not yet approved. It is in the registry so teams can try it; the API may still change before approval.

A context menu opens where people right-click, or long-press on a touch screen. It holds actions for the thing under the pointer. It looks and works like the Dropdown menu.

When to use

  • As a shortcut on things people work with a lot: rows in a list, files, steps on a workflow canvas.

When not to use

  • As the only way to reach an action. Many people never right-click, and touch users may not know to long-press. Put the same actions in a visible place too, such as a “More actions” menu button.
  • On ordinary text or links. People expect the browser’s own menu there.
  • For navigation. Use links.

Anatomy

Part Notes
Menu color.surface.overlay with no border, radius.overlay, elevation.shadow.overlay, padding space.overlay, at z-index.overlay.
ContextMenuItem 32 px (size.control.default): optional icon (color.icon.subtle), label (font.label.default), space.item.x at the sides, radius.item, optional ContextMenuShortcut (font.body.small, color.text.subtle). Highlight color.surface.overlay.hover. variant="destructive" uses color.text.danger.
ContextMenuCheckboxItem An option people turn on or off. A check in color.icon at the end shows it is on.
ContextMenuRadioGroup, ContextMenuRadioItem One choice from a few. The chosen item shows the check.
ContextMenuLabel, ContextMenuGroup A heading for a group of items: font.heading.xsmall, color.text.subtle.
ContextMenuSeparator A color.border line between groups.
ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent A sub-menu: the trigger has a chevron and keeps its highlight while the sub-menu is open.
inset On an item, label or sub-trigger with no icon, lines its text up with items that have one.

The trigger area (ContextMenuTrigger) has no style of its own. Make it focusable (tabindex="0") so keyboard users can open the menu.

Content

  • Write items as actions in sentence case: “Duplicate”, “Move to”.
  • Put destructive items last, after a separator.
  • Show the checked state with the check, which the menu does for you; never with colour alone.
  • Keep sub-menus to one level, and never put the only copy of a common action in a sub-menu.
  • Use the same names, order and shortcuts as the visible menu for the same thing.

Tokens

color.surface.overlay, color.surface.overlay.hover, color.border, color.text, color.text.subtle, color.text.danger, color.text.disabled, color.icon, color.icon.subtle, color.icon.danger, color.icon.disabled, radius.overlay, radius.control.small, elevation.shadow.overlay, z-index.overlay, size.control.default, size.icon.default, space.050, space.100, space.400, font.body.default, font.body.small, font.label.small.