Skip to content

Modal dialog usage guidelines

A modal dialog is an overlay element which blocks interaction with outside elements. It can be used to focus the user’s attention on a specific subtask.

  • To display additional content or settings without navigating away from the page.
  • To capture user input for a short form or interaction, like renaming a file or changing a setting.
  • To display system feedback that must be acknowledged.
  • For content that can be shown inline, use a disclosure.
  • If the user can continue their workflow without immediate interaction, use an alert or a toast instead.
  • For long or complex workflows, use a dedicated page.
ValueUse cases
SmallFor short information or quick inputs (1-2 lines of text).
MediumStandard dialog for most actions, including forms and decisions.
LargeWhen more content is needed, like previews, detailed forms, or multiple fields.

Modal dialogs are centered on the screen, and placed on top of a darkened overlay to call the user’s attention to the dialog.

Modal dialogs can contain any other components. Design best practices should continue to be followed within a modal dialog.

Modal dialogs can contain actions for the user to take. These actions are displayed at the bottom of the modal dialog. The example below shows a modal dialog with actions:

  • Use clear, concise, and distinct titles that make it obvious what the modal dialog contains.
  • Use clear labels for action buttons and links.
  • If the content gets unreasonably long or space becomes an issue, consider using a different solution.

Users can close the modal dialog via the close button in the top right, clicking outside, or pressing the Escape key.