Menu

Contextual actions in a compact, keyboardable list.

v1.0.0·Updated Jul 8, 2026 · 10:45
Live Demo — Fully Interactive
A trigger opens contextual actions — click the ⋮
Configuration
Icons
Shortcuts
Danger row
<Menu icons shortcuts danger />
Behavior — The Engineering Contract
Prop / eventTypeNotes
Item.onSelect() => voidRuns the action, then closes
icon / shortcutReactNode / stringLeading glyph and trailing key hint
dangerbooleanRed destructive row
Divider · sectionGroup related items with a rule or label
↑ / ↓ · Enter · EscMove, run, or close; type-ahead jumps

A Menu lists actions on a thing. For choosing a value use a Dropdown; for a primary action with alternatives use a Split Button; for a global palette use the Command Menu.

Anatomy
EditEDelete
1IconOptional leading glyph for the action.
2ShortcutMono key hint, right-aligned.
3Danger rowDestructive action in red, below a divider.
Do's and Don'ts
✓ Do
RenameDelete

Separate the destructive action with a divider, and colour it red.

✕ Don't
DeleteRename

Don't put a destructive action first, where it's easy to hit.

✓ Do
Copy⌘CPaste⌘V

Show the keyboard shortcut so people learn the fast path.

✕ Don't
CutCopyPasteRenameMoveShareStarArchive

Don't dump twenty items in one flat list. Group, or use sub-menus.

In context: Examples
A · Row overflow
EditDuplicate

The ⋮ overflow menu on a table or list row.

B · Right-click
Cut⌘XCopy⌘C

A context menu on right-click, with shortcuts.

C · Account
ada@team.com
Settings
Sign out

An account menu from an avatar, with a section label.

Measurements & Tokens
TokenValueRole
--menu-bg#141519Panel surface
--menu-border#262A30Panel + divider hairline
--menu-hover#1E1F25Row hover fill
--menu-icon#767B87Leading glyph
--menu-danger#F2777BDestructive row
--menu-kbdmono · #565A62Trailing shortcut hint
Code
<button aria-haspopup="menu" aria-expanded="true">⋮</button>
<div class="o-menu" role="menu">
  <button role="menuitem" class="o-menu__opt"><EditIcon /> Edit <kbd>E</kbd></button>
  <button role="menuitem" class="o-menu__opt"><CopyIcon /> Duplicate <kbd>⌘D</kbd></button>
  <div class="o-menu__divider"></div>
  <button role="menuitem" class="o-menu__opt o-menu__opt--danger"><TrashIcon /> Delete</button>
</div>