Notification are a type of alert. Notifications succinctly message relevant information. They’re timely, easy to understand, and have a clear purpose. Be straightforward in tone and action to help guide people through.
| Variation | Description |
|---|---|
| Information | Use for messages that are both helpful and related to content on the screen |
| Success | Use for the successful completion of an action and include next steps when helpful. These should not be used as toasts. |
| Caution | Use for messages that require attention but are not a critical blocker to moving forward or security |
| Error | Use for negative messages that need immediate attention and a resolution. Reserve for errors or an impact to security. When the message tone is severe and requires a fix, it shouldn’t be dismissible. |
| Variation | Description |
|---|---|
| Success | Use for the successful completion of an action and include next steps when helpful. |
| Error | Use for negative messages that need immediate attention and a resolution. Reserve for errors or an impact to security. |
It’s important to think about what the user needs in the moment. Offer solutions to address issues and get ahead of their problems or questions.
Write in an 8th grade (13-14yr old) reading level. This considers people with disabilities and users reading in a second language.
Page Level Notifications:
Notification messages may use both title and message or one of title or message.
Component Level Notifications:
Component notification must have a message, this is best practice and also an accessibility requirement for errors. Find out more about accessibility requirements for messages.
When defining error scenarios and writing their messages consider:
The Problem
What happened and why?
The Solution
What can the user do to fix the problem? If there isn’t anything they can do, what’s the most helpful thing we can tell them?
“We were unable to load your information. Please try reloading the page.”
“Sorry! This API failed to pull data from our system. Your action could not be completed.”
No one knows what that means or what they should do next.
Although the best error message is no error message, it’s inevitable that things will go wrong, either due to the user inputting something incorrectly or a system failure. When this happens, it’s important to get the error message right. Before writing the error message, clearly identify the problem and the solution.
Error messages save users time by helping users know where they have incorrectly filled in a form.
Page Level Notifications:
Notifications prominently appear directly below the navigation and above all other components displayed on the page.
Notifications take up space on the screen and push page content down. When dismissed the space they leave should be filled.
Notifications take up space on the screen and push page content down.
Notifications that cover content may cover critical information for the user such as page title, navigation, statuses, and content related to the notification. When designing any sticky elements, remember to consider reflow and screen height. Larger notifications could cover the whole page.
Component Level Notifications:
Appear below inputs so they are predictable. However, there are some exceptions, like date picker. When placing notification inside the date pickers calendar put them above the calendar. Find out more about notification placement for date picker.
Component level notifications appear below inputs so they are predictable.
Change the order of content in a component, forms should be predictable though out our users experience.
Dismissing a notification is optional and should match the type and tone of the message. Always consider the best user experience when choosing between a permanent or temporary notification.
When dismissing, do not add animations that distract or redraw content on the page.
Dismissing a notification is optional and should match the type and tone of the message. Always consider the best user experience when choosing between a permanent or temporary notification.
When dismissing, do not add animations that distract or redraw content on the page.
Notifications can be dismissible or permanent.
To help people focus on the message, strive to only have one notification shown at a time. If it’s impossible to avoid and multiple notifications need to be shown, keep their style consistent.
Multiple messages take longer to understand when they have inconsistent styles.
To optimize fit across a wide range of screen sizes, horizontal padding is responsive and matches the gutter sizing of our grid breakpoints.
For smaller breakpoints and longer error messages text wraps, keeping the icon at the top.
Connect with the DLS Team on Slack or by email.
Check out additional resources.