Skip to content

Alert dialog usage guidelines

Alert dialog is the most disruptive and urgent messaging component, appearing as an overlay that interrupts user activity and requires an immediate user action.

  • For critical errors that halt user progress and require immediate resolution.
  • To confirm destructive or irreversible actions (for example, deleting a resource).
  • To prompt users for an immediate decision that impacts their workflow significantly.
  • When the user must choose between specific actions (for example, “Save changes,” “Discard changes”).
  • Alert dialogs should be used sparingly for only the most important notifications as they heavily disrupt user flows.
  • Use an alert for persistent messages that need to remain visible until addressed.
  • Use a toast for low-importance feedback messages that do not need to be addressed by the user.
  • Use a callout for proactive, general announcements or updates that are not triggered by a specific user action.
ValueUse cases
SuccessUsed for confirmation of successful actions, processes, and positive outcomes.
InfoUsed for important details without implying positivity or negativity.
WarningUsed for non-critical issues, potential problems that won’t block user progress, and recommendations for attention.
CriticalUsed for critical issues that will block user progress or otherwise need to be addressed.

Alert dialogs are notification-specific modal dialogs, and they should follow the same placement as other modal dialogs. They are centered on the screen, they overlay all other page content, and they are placed on top of a darkened overlay, forcing user attention to be on the alert dialog. Users cannot return to any other page content until they take action in the alert dialog.

Alert dialogs must contain at least one action for the user to take. These actions are displayed at the bottom of the alert dialog.

If there is a suggested best course of action, or an action that the user is expected to take (for example, “Delete” in a delete confirmation modal), that action should be rendered using a primary button. In the case of equal actions (for example, “Replace”, “Keep Both”, and “Abort” when copying files), all actions should be rendered using secondary buttons.

In alert dialogs that use the critical tone, the primary action button should also use the critical tone.

  • Give users a concise, clear overview of the situation or the user action that’s needed.
  • Explain the situation clearly.
  • Specify what action is required, and any outcomes that users should expect from taking the available actions.
  • Keep the message as brief as possible while providing necessary context.
  • Use clear labels for buttons (for example, “Delete”, “Confirm”, or “Cancel”).
  • The primary action should be the action the user is expecting to take (“Delete” in a delete confirmation modal) or the action that’s the suggested best course of action.
  • In the case of equal actions (for example, “Replace”, “Keep Both”, and “Abort” when copying files) use secondary buttons for all actions.

Alert dialogs can only be dismissed by taking action with the buttons in the dialog. Users cannot otherwise return to the page they were working in and cannot take any other actions.