Menu
A menu is a list of choices for navigation: a top bar, a side list whose submenus open in popups, or a side list that expands in place and can collapse to icons. Items are written as data (items) or as markup. It is keyboard-ready and built on the popup layer of the library.
When to use
- Use a menu for the navigation of a site or an application: a top bar with the main sections, or a side list with several levels.
- Pick the type by the room and the depth:
horizontalfor a few sections,verticalfor a side list whose submenus open beside it,inlinefor a deep tree that expands in place, andinlineCollapsedto give the room back. - A menu of actions (nothing is selected) uses
selectable={false}. A menu that opens from a button or by a right click is theDropdown, which draws this one.
Examples
mode="horizontal", with a submenu and a disabled item