Confirmation dialog
Confirmation dialogs ask users to confirm a potentially destructive action, a high-impact decision, or accept or reject terms.


- Container
- Header
- Body
- Buttons
Title
The title is required and frames the decision the user needs to make. A strong title is specific about the action being confirmed and often posed as a question.
- Use sentence case
- Keep to 1 line
- Frame as a question when possible
- Don’t use ending punctuation, unless it’s a proper sentence like a question

Body
The body is required and explains what will happen if the user confirms or rejects. A strong body clearly states the consequences, especially for destructive or irreversible actions, and includes specific details.
- Keep to 1-3 sentences
- Avoid repeating the header

Buttons
Confirmation and cancel buttons are required. Selecting one of the two actions is the only way to dismiss the dialog.
The primary action button confirms and executes the action, so the label should clearly describe user’s action.
- Use sentence case
- Keep to 1-3 words
- Avoid generic labels like "Yes" or "OK"
The cancel button dismisses the dialog without taking action. Common labels for cancel buttons are “Cancel” and “Go back”.
- Use sentence case
- Keep to 1-2 words
- Avoid "No" unless the title is a clear yes/no question
See Buttons for more details on visual hierarchy and writing guidance.

Scrim
The scrim is a semi-transparent overlay that focuses attention on the dialog. The scrim isn’t interactive and doesn’t dismiss the dialog.

Presentation
Confirmation dialogs fade in and out from the center of the screen.
Confirmation dialogs are commonly triggered by a user action, like deleting a record. However, the application can trigger a confirmation dialog to appear to inform the user of an important update that requires their attention.
Dismissing
Confirmation dialogs can be dismissed by clicking either the confirmation or cancellation action. Pressing the escape key on a keyboard will register as the cancellation action.

Button placement
The alert dialog button is positioned along the trailing edge of the dialog container below the body content.

Width & height
Confirmation dialogs are a fixed width to maintain readability and encourage short, simple messaging. They flex vertically to fit their content down to a maximum height of 400px.

Small screen
Alert dialogs on small screens are centered.

Large screen
Confirmation dialogs on large screens are centered and inset as well.

Scrolling
Do ensure confirmation dialogs do not scroll.

Don’t pack confirmation dialogs with content that would cause it to flex beyond the maximum height or scroll.

Critical messaging
Do use confirmation dialogs when informing a user of a decision’s impact. These dialogs present two actions and are dismissed by interacting with one of them.

Don’t use a confirmation dialog when an alert is triggerd by the system.

Actions
Do utilize CTA buttons to direct user to interact before dialog is dismissed.

Don’t show confirmation dialogs without CTA buttons.

Types of buttons
Do always use a primary button with a borderless button

Don’t use secondary or tertiary buttons.

Alignment
Do always center-align alert and confirm dialogs.

Don’t bottom-align alert and confirm dialogs.


Confirm dialog