Modal Design
Modals are overlays that temporarily block the main view of the application. They are used for confirming actions, selecting options, managing items, and previewing information.
In Practice
Modals can be incorporated when users are required to make choices or enter information to continue with their current task. They can be helpful in breaking up complex workflows that involve multiple steps.
The three main parts that make up a modal are:
- Header - displays the title and the close icon.
- Body - contains the main content which could be text only or a combination of different interactive elements. The body area is scrollable if the content exceeds the height of the modal.
- Footer - can show actions and links as needed.
Limit footer options
The modal component allows for up to three options in the footer (primary, secondary, tertiary). We advise limiting it to one or two options. A third option may be unavoidable at times, but should be used sparingly.
Avoid multiple modals
Showing more than one modal at a time is overwhelming and confusing for users. If necessary, use a progressive modal in cases where the user can navigate forward and backward through sequential modal content.
Size considerations
The design system includes four modal sizes (S, M, L, XL). Choosing the appropriate size for your design is about balancing the amount of content to enhance readability.
For example, with shorter content, use a small modal to avoid long single lines. With longer content, you’ll want to use a larger modal to reduce scrolling.
Types of modals
Confirmation modal
These modals ask for explicit user confirmation for actions that may have significant consequences. They help prevent accidental changes or data loss. The user must choose an action to proceed.
Information modal
Displays additional information or instructions within a page context. Does not require user action.
Settings modal
Lets the user select or update system settings and other options. Selection/builder modal
Allows the user to select from a list of records to add, remove, or link together in some way. Can include search.
Form modal
Presents a form within a focused workflow, allowing the user to fill out and submit information.
Progressive modal
Made up of multiple, sequential steps that guide the user through a task.
Full-page modal
Used for complex workflows that require larger page real estate and focused engagement.
Accessibility
- Modals should be operable using the keyboard alone.
- Focus should remain and cycle through an open modal until it is dismissed.
- Aside from the other available actions, modals can be dismissed by pressing the ESC key.
- Follow the accessibility guidelines for each element used in the modal. View guidelines