ContextMenu
Open actions for an item with a right-click or Shift + F10.
alpina-ui/interactive/context-menuCover proof
Right-click or press Shift + F10 to open the menu.
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.
| Key | Action |
|---|---|
| Shift+F10 / Menu | Open the context menu from its focusable target. |
| ↑ / ↓ | Move between menu items. |
| Home / End | Move to the first or last item. |
| Type | Focus an item by its label. |
| Enter / Space | Run the focused enabled action. |
| Escape | Close 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
npx --no-install alpina add context-menu