Components
← All components

Menu Button

stimeo--menu

A real menu of commands you walk with the arrow keys. Not the same thing as the dropdown.

  • Core
  • Menu Button

A menu of commands opened from a button. It implements the WAI-ARIA Menu Button pattern: the arrow keys walk the items and Home and End jump to the ends. Esc, Tab, a click outside, or activating an item closes it. Unavailable items come in two kinds. A fully disabled item is skipped by the arrow keys, while an item marked unavailable stays reachable so it can be found, but cannot be activated. Clicks and keys are handled for the menu as a whole, so items need no setup of their own and items added later work straight away. Placement here is this demo's CSS.

running

Keyboard

KeyAction
Enter / Space / ↓ Open the menu and focus the first item.
Open the menu and focus the last item.
↓ / ↑ Move focus between items (wrapping).
Home / End Focus the first / last item.
Enter / Space on an item Activate an enabled item; an aria-disabled item remains inactive.
Esc Close the menu and return focus to the trigger.