ContextMenu
A right-click menu on the popover surface.
The right-click menu on the measured popover surface, positioned at the cursor (flipping at the viewport edges).
Installation
npm install @crisp-ui-kit/crispProps
Wrap a target and pass an items array; closes on select, outside pointer-down, and Escape.
Keyboard
The menu carries role="menu", which puts a screen reader into application mode — arrow keys
become the only navigation there is — so the full model is implemented rather than implied.
| Key | Action |
|---|---|
↓ / ↑ | Move between items, wrapping at both ends. Separators and disabled items are skipped. |
Home / End | Jump to the first or last item. |
Enter / Space | Run the focused item. |
| letters | Typeahead — jump to the item starting with what you type; the run resets after 500ms. |
Esc | Close. |
Tab | Close — a menu is not a focus trap. |
Opening moves focus to the first enabled item. Escape and selecting an item put focus back on
whatever had it before the menu opened; Tab deliberately does not — the browser is already
moving focus to the next element, and restoring first would land you in the wrong place.
This is crisp's shared menu model (useMenuKeyboard), the same one Menu and
the records table's own popovers run, so every role="menu" surface in the kit behaves alike.
Submenus
An item with a submenu (an array of the same option shape, nestable) becomes a cascading row with
a trailing chevron: { label: "Move to", submenu: [{ label: "Backlog", onSelect }, …] }. It is
rendered by Menu's own placement="submenu", so it opens on hover (after a short
intent delay) and on ArrowRight / Enter / Space; ArrowLeft and Escape close only that
level and return focus to the row; selecting a leaf closes the whole menu. Shortcut, role and
checked work on the nested items too. Submenu surfaces use Menu's look, including under
variant="dark".