Menu
Action menu for contextual options and commands. Supports icons, keyboard navigation, submenus, sections, dividers, disabled items, and selection.
Anatomy
1
2
3
- 1 Menu item — interactive list item
- 2 Divider — visual separator between items or sections
- 3 Disabled item — non-interactive menu item
Options
Items
Sections with dividers
Submenu
Table of options
| Property | Values | Default |
|---|---|---|
| ariaLabel | text | — |
| role | menu / listbox | menu |
| disabled | true / false | false |
| selected | true / false | false |
| icon | text / HTML | — |
| hasSubmenu | true / false | false |
Keyboard interactions
| Key | Action |
|---|---|
| ArrowDown | Moves focus to the next item; wraps to first |
| ArrowUp | Moves focus to the previous item; wraps to last |
| Home | Moves focus to the first item |
| End | Moves focus to the last item |
| Enter / Space | Activates the focused item |
| Escape | Closes the menu (fires uif-menu:close event) |
Accessibility
- Use
role="menu"on the container androle="menuitem"on each item. - Use
aria-labelon the menu to describe its purpose. - Use
aria-disabled="true"(not justdisabled) on disabled items to keep them discoverable to screen readers. - For selection menus, use
role="menuitemradio"orrole="menuitemcheckbox"witharia-checkedon items. - The
<uif-menu>web component manages rovingtabindexautomatically.
Design checklist
All brand/mode contextsWorks across light and dark modes.
Keyboard interactionsArrow key navigation, Escape to close.
SubmenusNested menu revealed on hover/focus.
Sections/dividersGrouped items with optional labels and separators.
Disabled itemsNon-interactive items retain accessible presence.
Selection statesSingle and multi-select via aria-checked.
Design tokensComponent-scoped tokens (
--uif-menu-*).