Modal
Modals provide important prompts in a user flow.
Resources
Name | Resource | Status |
---|---|---|
Figma | Design Kit (Figma) | Private |
On this page
On this page
Usage
Basic Usage
Customization
You can customize each Modal component like you would any other component.
API
On this page
Use Cases
- Users should be able to:
- Open and close a modal
- Provide and submit other inputs if the modal is interactive, such as a text field or selectable list
- Keep focus within the modal until it is closed
Interaction & Style
Modals are purposefully interruptive. This means they appear in front of app content and disrupt the flow of content for users who may, for example, be using a screen reader to navigate the page.
As such, modals should be used sparingly and only to provide critical information. Less critical information should be presented in a non-blocking way within the flow of app content.
Keyboard Navigation
Keys | Actions |
---|---|
Tab | Focus lands on the next interactive element contained in the modal, or the first element if focus is currently on the last element |
Shift + Tab | Focus lands on the previous interactive element contained in the modal, or the last element if focus is currently on the first element |
Space / Enter | Triggers or commits the action of the focused element |
Esc | Closes the modal and returns focus to the element that triggered the modal |
On this page