Modal

Modals direct the user's attention to a task or information through a window overlaying the page content.

Component checklist

Status

The status of the component

Ready for use!

Figma component

A link to the Figma library where the component lives.

Repository

A link to the repo where the component lives.

Usage


A basic modal

A basic modal

Modal component

Usage Guidance


Use clear and concise language

Modals can disrupt a user's workflow, and users often want to dismiss them to return to their tasks quickly. When modals become necessary, use clear and easy-to-understand language.

 

Do
A modal with a clear title about action results.

Offer to the point messaging. In this example, a clear warning is issued for an action that has permanent results.

Don't
A modal with long text about action results.

Avoid wordy text if the message can be expressed more efficiently.

Use modals to prevent errors

If the task involves critical steps that are difficult or cannot be reversed, a modal displaying a warning is recommended.

Do
A modal to help the user with the task at hand.

A modal here may be used to determine the role of the user at the onset as it simplifies the workflow thereafter by providing only the applicable options.

Don't
A modal distracting the user from the task at hand.

Do not use a modal that interrupts a user’s workflow without providing any added value. In this case, the collected data does not directly help the user’s current task at hand.

Use modals to simplify workflows

A modal may be used if the information being solicited helps to reduce complexity.

Do
A modal to help the user with the task at hand.

A modal here may be used to determine the role of the user at the onset as it simplifies the workflow thereafter by providing only the applicable options.

Don't
A modal distracting the user from the task at hand.

Do not use a modal that interrupts a user’s workflow without any providing any added value. In this case, the collected data does not directly help the user’s current task at hand.

A modal may break down long and/or complex workflow into more consumable parts. The use of wizards is a common example.

Do
A modal with one step of the task.

In this case, the workflow breaks down the complex steps of building a report into 5 different screens. These screens may group related actions together to help guide the user to complete the task successfully.

Don't
A modal breaking down a task into 30 steps.

This example shows a modal containing a workflow that involves 30 screens. Not only this does not simplify the task for the user, but it also locks the user in this mode. If the user requires information from another part of the application, there may be no way to exit the modal without losing the data within it.

Do
A simple and concise modal.

Keep instructions simple and the context limited to avoid crowding too much information into the limited space.

Don't
A modal with many steps.

Do not put as much information as possible into one screen in order to reduce the number of steps. Condensing too much data into the modal makes difficult to navigate through the workflow.

 

Dismiss on overlay click

By default, dismissal on overlay click is disabled, but the coded component itself has the option to enable this behavior; however, this should ONLY be enabled if...

  • The content DOES NOT contain critical/essential information, like important notices the user should read in full.

  • The modal IS NOT a “DANGER” variant

  • The modal DOES NOT contain a large form, and the user progress can be lost, e.g, a code editor inside the modal, a multi-step form, or any form that contains more than 5 form fields.

The overlay should not be focusable, meaning that, even when the "click on overlay to dismiss" is enabled, the dismiss button SHOULD be also be visible, for people who use screen readers or navigate via the keyboard.