Usage
ContextMenu surfaces actions tied to a specific element via secondary-click or long-press. It speeds expert workflows on dense data but is invisible until invoked, so every action inside it must also be reachable through a visible path—row actions, a kebab menu, a toolbar, or a command palette. Platform guidance is unambiguous here: the context menu is an accelerator, never the only way to do something.
Right-click target
Incident
Flag for QA
Copy CAD ID
Delete comment
Button, IconButton, or Menu trigger.formatMessage everywhere.sortable on ContextMenu or NavigableContextMenu lets operators reorder items by drag or keyboard when order should persist (for example column lists). Use stable sortableId values on each item and handle onReorder. Every reorderable action must still be reachable outside the context menu—do not rely on right-click alone.
40vh max height, root context menu panels apply a --overflow modifier that reserves space for a vertical scrollbar (scrollbar-gutter: stable with a narrow themed track). Short menus that fit within the panel do not show an empty gutter. While scrolling, the panel does not widen or shift horizontally.Do
Don't
Provide keyboard-accessible alternatives to the gesture—an explicit Menu trigger, a documented shortcut, or both. Screen reader users may not discover context menus at all, so this parallel path is non-negotiable. See Accessibility for the full contract.
For sortable context menus, use Shift+Space or Shift+Enter on a focused row to begin keyboard reordering. Assign unique sortableId values when labels can repeat; duplicate identifiers and collapsible groups, including fragment-wrapped groups, disable sorting.