DocsDocs

Menubar

A desktop-style bar of menus, such as File, Edit and View.

StableSince 1.0.0
On this page

Overview

Show code, NotesMenubar.tsx

Variants

In a title bar

The app frame pattern shows the whole title bar, in an installed app's window.

Show code, InTitleBar.tsx

Anatomy

  1. Menubar

  2. Trigger

  3. Access key

  4. Menu

Show code, MenubarAnatomy.tsx

Behaviour

After a command

Menubar returns focus to where it was, so Copy acts on the field people were in.

Access keys

A menubar can underline a letter of each menu's name while Alt is held.

  • Alt with the letter opens that menu.
  • One menubar per window has them.

Rules

A menubar groups many commands, and the most frequent ones stay in view too.

Use it when

  • Many commands in a document-centred application, grouped as File, Edit, View and Help
  • The application's menus at the start of a title bar the window draws itself

Content

Name items as in Menu, with an ellipsis for a command that asks for more, such as Export… in File.

Accessibility

KeyAction
Tab, Shift+TabMoves to the menubar, one tab stop, and out of it.
←, →Moves between triggers, or between open menus.
↓, Enter or Space on a triggerOpens its menu with the first item highlighted.
EscCloses the menu and leaves focus on its trigger.
AltWith access keys, moves focus to the first trigger and back.
Alt with an access keyOpens that menu.