Dialogs

A dialog is a conversation between the system and the user.

UsageOverview

Dialogs are triggered by an action when the system needs input from the user and are best when used for short tasks or to alert about task-relevant information.

Dialogs are disruptive so limit the usage of this pattern whenever possible and when necessary, make their purpose immediately apparent to the user and with a clear path to completion.

How to use

Use for:

How not to use

Don't use for:


AnatomyWriting & Tone

Use “we,” “our” and “you” to create a sense that we are speaking directly to our customers.

Tips Elements

Most dialogs contain the following elements:

  1. Header — Dialog title (sentence case) and dismiss button;
  2. Body — The goal and or controls to complete the dialog's task;
  3. Footer — Primary and secondary actions.

Behavior

Keyboard

In most cases:


Variations
Type Priority Context
Modal Modals Highest priority Page content is obscured to focus the attention of the user to one task or information until the action is taken or dismissed.
Popovers Popovers guidelines Medium priority Page content can still be accessed while the dialog is open.
Notifications Notification guidelines Low priority Alerts and toasts appear inline or to the side of the page and disappear automatically or after dismissed by the user.
Modals

A modal dialog interrupts the user flow. It does not expire during the browser session and it stays in the same area until the user takes an action. It surfaces an issue on the application either due to user input or server response.

Good examples of using a modal include:

Don't use modals when the user needs to reference information contained outside the modal.

Modal guidelines

Popovers

A popover dialog is a brief, persistent, non-disruptive message returned in the UI based on user action. It is displayed as part of the page on the same Z-index as the page's content.

Popover guidelines

Notifications

Notifications include inline alerts and toasts (snack bar). They are generally used for:

notifications


Best Practices
Related Components
Feedback

We would like to get your feedback. Tell us how you use this component in your projects and how we can improve it.

StyleModal

For more information on modals, read the respective guidelines.

Popover (non-modal)

For more information on popovers, read the respective guidelines.

Toast

For more information on toasts, read the respective guidelines.