Guides and Sample Code


macOS Human Interface Guidelines

On This Page

About Menus

A menu presents a list of items—commands, attributes, or states—from which a user can choose.

Menus have a few different forms in macOS.

image: ../Art/menu_intro1_2x.png

A menu bar menu displays the current app’s commands in the single menu bar at the top of the display. An app typically displays several menus in the menu bar. For an overview of the menu bar, see Menu Bar Menus.

A contextual menu displays commands that are directly related to an item. To reveal a contextual menu, users Control-click an onscreen area or a selection.

image: ../Art/menu_intro2_2x.png
image: ../Art/menu_intro3_2x.png

A Dock menu contains system-defined commands (such as Reveal in Finder and Keep in Dock) and, optionally, app-specific commands (such as New Window). To reveal a Dock menu, users Control-click or press and hold an app’s Dock icon.

By default, all types of menus use vibrancy.

Menu Anatomy

At a minimum, a menu displays a list of menu items. Most menus also include a title that indicates the types of items that are in the list. In addition, menus can include some optional components, such as keyboard shortcut symbols, hierarchical menus (also known as submenus), toggled menu items, separators, icons, and symbols (such as the checkmark). For example, the TextEdit Edit menu includes a list of commands, a title ("Edit”), keyboard shortcuts, hierarchical menus, and separators that indicate different groups of items.

image: ../Art/menu_elements_2x.png

A menu bar menu might include examples of all of these components, but not all components are suitable for every type of menu. For example, a contextual menu doesn’t need a title because it’s automatically associated with the user’s current selection. To learn more about providing a contextual menu in your app, see Contextual Menus.

Menu Behavior

All menus implement the explicit action paradigm: People identify what needs to be acted on and then specify the action by choosing a menu item. (To learn more about this paradigm, see Explicit and Implied Actions.)

To choose an item in a menu, the user opens the menu and moves the pointer to the desired item. As the pointer passes over each active menu item, it highlights and opens its submenu (if it has one). No action occurs until the user chooses an item. This behavior lets people open and scan menus to find out what features are available without having to actually perform an action. When the user chooses a menu item, it blinks briefly to confirm the user’s choice and then performs the action.

After the user opens a menu, it remains open until another action causes it to close. Such actions include:

  • Choosing an item in the menu

  • Moving the pointer to another menu title in the menu bar

  • Clicking outside of the menu

  • A system-initiated alert

  • A system-initiated app switch or quit