Skip to main content
  1. Docs
  2. Components
  3. Overlays

Context menu

A menu at the pointer: right-click, a long press, or Shift+F10. Menu's items, on any area.

Import
@qeetrix/react
Status
StableSince 0.1.0
Renders
<div role="menu">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • Shortcuts to a row's, a file's or a card's actions, where people look for them.
  • Dense tools: a canvas, a tree, a table.
Not for
  • The only way to an actionMenu
  • A choice in a formSelect

02

Anatomy

  1. 1context-menu-trigger<div>The area that opens it: give it tabIndex={0} if nothing in it takes focus.
  2. 2menu-popup<div role="menu">Menu's list, at the pointer, or at the focused element by key.

03

Do and don't

A shortcut, not the only way
DoThe same actions behind a visible ⋯ too.
Don'tActions only a right-click finds.

04

Content

  • The same items, in the same order, as the visible menu.
  • Destructive last, after a rule.
Next — Context menuAPI