Modals are dialogs displayed over inert content that allow users to complete a singular, focused task without leaving the page.
Modals are dialog boxes that display over the main page content that require the user's attention. Modals may hold supplemental information, request user interaction, or include a related workflow.
Be decisive when using Modals—versatility paves the road to misuse. Consider the following use cases before deciding to use a Modal:
Modals, Drawers, and Popovers are all dialogs that overlay page content to divert the user's attention. However, it's important to understand the difference as they are not interchangeable:
Never nest Modals. While doing so is possible, it's not a pattern we'd like to encourage due to poor user experience. Nested Modals complicate a workflow and increase the cognitive load a user may experience when attempting to complete a single, focused task.
Consider the following questions if nested Modals become a consideration:
Though Modals are highly customizable to fit a variety of use cases, it's best to reach for existing Modal patterns to maintain consistency throughout the system and application. Decide if your use case fits one of the following patterns before creating a new standard.
These people will be permanently removed from this segment and will no longer receive messages from associated campaigns.
Confirmation Modals hide the default close button to prompt a user decision. Primary and secondary buttons are used within the footer.
This action is permanent and cannot be undone. All profile data for these people will be deleted.
Destructive Modals require additional user input for irreversible actions. The default close button is hidden. The primary action is disabled until the input requirements are met.
Choose a descriptive name so your team can find this campaign later.
Form Modals include input fields to collect data. Dismissal by overlay click is disabled to prevent accidental data loss. The footer actions include the submit and cancel buttons.
You have unsaved changes that will be lost if you leave this page.
Modals can be used to ask the user if they'd like to save or discard changes they've made, or cancel the process entirely.
The campaign was last edited on March 12, 2025 at 3:45 PM.
Modals may display important read-only information, such as details or logs. The footer contains a single primary dismiss button.
Your campaign is live and ready to send.
Rarely, a Modal may be used to celebrate a completed action or introduce a new feature. Split Modals are used to present special graphics with the main content. A single call-to-action is included in the footer.
A single-column layout suited for confirmations, forms, and focused tasks.
Default Modals have a single column layout with an optional header and footer, and scrollable body content.
The left panel can hold an illustration or preview image while the right side contains your content.
Content goes on the left, with supplementary material displayed in the right panel.
Split Modals divide the modal into two equal columns. Place the split panel before or after the body to control which side it appears on.
The close button is visible by default for an easily visible way to dismiss the Modal. If required, it may be hidden. Hiding the close button are more appropriate for Modals that require immediate user input for an important action, such as deleting data. For such use cases, be sure to include a "Cancel" button.
This modal can be dismissed using the close button in the header.
Modals include a close button by default.
Please choose an action below to continue.
Close buttons may be hidden for cases where user confirmation is required.
ModalInset renders content edge-to-edge within the modal, extending over the default padding. Use it for full-width backgrounds, images, or dividers that should bleed to the modal's edges.
Review the campaign banner below before publishing.
Full-width preview area
Content extends to the modal's edges, ignoring the default padding.
Default Modals are ideal for forms, confirmations, and general content.
Medium Modals are the default for most use cases.
A compact modal for quick confirmations and small messages.
Small Modals are more suitable for shorter content and smaller viewports.
Modals animate in and out with a fade and downward slide. The overlay fades in and out independently. The default animation duration is 125ms but can be customized.
By default, when Modal content exceeds the Modal container's max height, body content will scroll while the header and footer remain fixed. Scroll behavior can be changed so the entire Modal will scroll with the viewport instead.
Body content scrolls within the modal.
The entire Modal scrolls within the viewport.
Modals can be dismissed through multiple methods: close button, action button, overlay click, and the Escape key. The close button may be hidden and both the Escape key and overlay click may be disabled with props.
Use non-dismissable Modals for cases where user interaction is mandatory, such as confirming a destructive action.
Note: Non-dismissable Modal examples are dismissable with the Escape key. This is purely for display purposes.
Reserve non-dismissable modals for actions that require an explicit choice.
When writing Modal content, keep the patterns below in mind:
| Element | Pattern | Example |
|---|---|---|
| Title | Action + object name? | Delete Q3 Re-engagement? |
| Body | Consequence. State if irreversible or recovery window. | This campaign will be deleted. This cannot be undone. |
| Confirm | Verb + object | Delete campaign |
| Cancel | Cancel | Cancel |
Footer action labels should describe what action will take place when activated. Mirror the title's verb when possible to reinforce the action.
A copy of this campaign will be created as a draft.
A copy of this campaign will be created as a draft.
While Modals are capable of expecting longer content than Popovers, we recommend keeping its content as concise as possible. The goal of a Modal is to help complete a single focused task. If more attention is required or multi-step tasks or workflows are intended, consider moving the content to a new page.
You have unsaved changes to this campaign. Do you want to save before leaving?
Titles should clearly describe the purpose of the modal in sentence case and include the object's name. When asking for confirmation, be sure the title ends in a question mark.
This will permanently delete the campaign and all associated data.
This will permanently delete the campaign and all associated data.