Guides and Sample Code

Developer

macOS Human Interface Guidelines

iBooks

Modality

Modality is a mode in which something exists or is experienced. In apps, modes can give users ways to complete a task or get information without distractions, but they may do so by temporarily preventing users from interacting with the rest of the app. Your job is to balance the advantages and disadvantages of modality so that users can focus on things that are important to them without feeling constrained.

For example, when users are in the sketch mode in Preview, they can’t select portions of the document or add text, contrary to what they can do in other modes.

image: ../Art/editing_mode_2x.png

As much as possible, use a mode only when the situation calls for it. For example, when:

  • It’s critical to get the user’s attention

  • Users initiate a task that must be completed before they do anything else in the app

  • The current task is modal in some way—for example, using a drawing tool in a graphics app or a font style in a document-editing app

Think carefully about an app design that requires users to enter modes frequently. In general, you don’t want users to experience your app as a series of disjointed tasks. You also want to avoid chopping up the user’s workflow by requiring too-frequent transitions into and out of modes. As much as possible, reserve modes for small, self-contained tasks that users are likely to want to finish all at once.

Balance modelessness with the need for a distraction-free experience. Sometimes, users appreciate an isolated, self-contained environment in which to accomplish a task. Your challenge is to provide a mode that’s both discrete and full-featured. Users don't appreciate finding that they need to exit a mode to get information or perform a subtask that’s required to accomplish the modal task. As much as possible, let users perform tasks in a way that integrates with the rest of your app’s functionality, and use a mode only when it provides value.

Scope the modality appropriately. In general, choose the least restrictive mode that makes sense. For example, if users should finish a task in a document window before doing anything else in that window, use a document-modal dialog (also called a sheet). A sheet prevents users from interacting with the window it’s attached to, but it doesn’t prevent users from interacting with other parts of the app. To learn more about using sheets, see Dialogs.

Clearly indicate the current mode. If users can enter different modes in your app, make it easy for them to tell at a glance which mode they’re in. For example, a graphics app might use different pointer styles to indicate whether the user is currently in drawing, erasing, or selection mode. A segmented control can also show which mode the user is in; for example, the View segmented control in the Finder toolbar indicates whether users are in icon, list, column, or Cover Flow view. And a popover offers a very strong visual indication of a self-contained task. To learn more about using a popover in your app, see Popover.

Make modes easy to leave. You don’t want users to feel that they’re trapped in a mode or that it takes effort to leave it. For example, you can enable a transient mode by using a popover, which can close automatically when users click outside of it. Be sure to save the work done in a modal environment, in case users leave the mode without meaning to.

Use an alert only when necessary. In particular, avoid using an alert to deliver information that the user can’t act upon. An alert should clearly describe the problem, why it happened, and the options for proceeding. Describe a workaround if one is available and do whatever you can to prevent the user from losing any data. For detailed guidelines on creating good alert messages, see Alerts.