Navigation
Menu
A list of actions or choices from a button: sections, shortcuts, submenus and checkable items.
Ant Design: Dropdown, Menu
import { DropdownMenu, MenuItem, MenuSection, MenuSeparator, Submenu } from '@alea/ui';
Examples
Actions
Sections, shortcuts, a danger item at the end.
Selectable
selectionMode turns items into a single or multiple choice.
Props
Accessibility
- A menu named by its trigger; items are menuitem, menuitemradio or menuitemcheckbox.
- Typing jumps to items; focus returns to the trigger on close.
Keyboard
| Key | Does |
|---|---|
| Enter, Space, Arrow Down | Opens the menu |
| Arrow keys | Move between items |
| Arrow Right / Left | Open / close a submenu |
| Escape | Closes |
| Letters | Jump to an item |
Do and don't
Do
- Put destructive items last, with tone="danger".
Don't
- Don't hide the main action in a menu.
- Don't use a menu to pick a form value: use Select.