Skip to content

ContextMenu

Open actions for an item with a right-click or Shift + F10.

alpina-ui/interactive/context-menu

Interactive preview

Cover proof

Right-click or press Shift + F10 to open the menu.

Copies · 1

Usage notes

The invoking region identifies the open menu through aria-controls. The menu uses visible-viewport positioning and restores focus to the invocation point.

When to use

Offer shortcuts to actions on a particular document, row or selection.

When to avoid

Keep a visible route to every essential command for people who never use a context click.

Accessibility

Provide a keyboard invocation and an ordinary actions button. Return focus to the item when the menu closes.

Keys
KeyAction
Shift+F10 / MenuOpen the context menu from its focusable target.
↑ / ↓Move between menu items.
Home / EndMove to the first or last item.
TypeFocus an item by its label.
Enter / SpaceRun the focused enabled action.
EscapeClose and restore focus to the invocation target.

Content

Name the commands with concise verbs. Include the object when the same action could affect a larger selection.

Use
Rename document
Avoid
Modify

Copy in four languages

German
Dokument umbenennen19 characters
French
Renommer le document20 characters
Italian
Rinomina documento18 characters
Romansh
Midar il num dal document25 characters
Add to your project
npx --no-install alpina add context-menu