Manual · 8
Menu bar
Apps with several pages get a menu bar like desktop applications: menu titles at the top (e.g. “File”, “View”), each opens a menu with entries, separators and one level of submenus. Set up in the Menu bar tab of the App-Builder.
Entries
- Open page, address (link in a new tab) and/or actions (the same steps as for buttons).
- Shortcut, e.g.
Ctrl+S,Ctrl+Shift+RorAlt+1– they work everywhere in the app. Shortcuts the browser keeps for itself (Ctrl+W,Ctrl+T,Ctrl+N,Ctrl+Q) are flagged by the editor. - Visible when, Enabled when and Checked when – each an expression, e.g.
state.onlyOpenoruser.role === 'admin'. With “checked” the entry becomes a toggle. - An & before a letter makes it the access key: “&File” opens the menu with Alt+F (the letter is underlined).
Use
A click opens a menu, afterwards hovering opens the neighbouring menu. Arrow keys move between entries and menus, Enter selects, Esc closes. The current page is marked in the menu. With the roles menubar/menu/menuitem the bar works with screen readers too.
On narrow screens the bar becomes a menu button ☰ with all entries as a list.