Contextual Menus

A contextual menu, or shortcut menu, gives people access to frequently used commands related to the current context. A contextual menu is revealed by Control-clicking a view or selected element in an app. For example, Control-clicking selected text in TextEdit displays a contextual menu containing text-specific menu items for initiating actions like changing the font and checking spelling.

Screenshot of a document in which the word "dog" has been selected. A contextual menu appears next to the selection and includes items such as Look Up "dog", Cut, Copy, Share, and Services.

Always follow menu design best practices. In general, all menus and menu items should be consistently arranged and titled. See Menu Anatomy.

Include only the most commonly used commands that are appropriate in the current context. For example, in the contextual menu for selected text, it makes sense to include editing commands but it doesn’t make sense to include a Save or Print command.

Limit the hierarchical depth of contextual menus to one or two levels. Submenus in contextual menus can be difficult to navigate without accidentally dismissing the contextual menu. If you must include submenus, restrict them to a single level.

Don’t set a default item in a contextual menu. If the user opens the menu and closes it without selecting anything, no action should occur.

Always make contextual menu items available in the menu bar too. A contextual menu is hidden by default and a user might not know it exists, so it should never be the only way to access a command. In particular, avoid using a contextual menu as the only way to access an advanced feature. See Menu Bar Menus.

Show keyboard shortcuts in menu bar menus, not contextual menus. Contextual menus are already shortcuts to task-specific commands; it's redundant to display keyboard shortcuts too.

Use an Action pop-up button to elevate contextual menu functionality. You can use an Action pop-up button to provide app-wide contextual menu functionality in a toolbar. For example, people can use the Action pop-up menu in the Finder toolbar to access the same commands found in a selected item’s contextual menu. See Action Pop-Up Buttons.

For developer guidance, see Application Menu and Pop-up List Programming Topics.