Notification
Feedback – Status – Toast
Notifications tell users about system status, the result of an action, or a change that needs their attention. One component serves as a toast, an inline message, a page-level message, or a prompt to act.
Online booking is unavailable during this window. Existing bookings aren't affected.
Usable — may still change
Notifications tell users about system status, the result of an action, or a change that needs their attention. The same component serves four uses, which share a visual language and differ in persistence, placement and how much they interrupt.
Anatomy
Section titled “Anatomy”- Notification
- Icon
- Title
- Description
- Inline link
- Close
- Body
- Actions
When to use it
Section titled “When to use it”- Toast: a quick confirmation of low importance, such as “Changes saved”. The user doesn’t need to do anything.
- Inline: feedback tied to a specific element, such as a form validation error or a warning inside a card.
- Standalone: a system message that affects the whole page or session, such as being offline or scheduled maintenance.
- Actionable: the user must decide or act to continue, such as “Your session expires in 2 min — Renew session”.
Avoid a Notification when:
- The user needs to reference the content later — use a page or an email.
- The update is a micro-action that needs no acknowledgement. Too many notifications teach users to ignore them.
Properties
Section titled “Properties”Type
Error, Info, Warning, Success and Neutral. Type sets the fill, the border and the bar along the leading edge. Use one colour and icon per severity across the whole product.
Optional parts
Every part can be left out: icon, title, description, inline link, body, standalone link and tertiary button. Remove both the link and the button to drop the whole actions row.
Platform considerations
Section titled “Platform considerations”Desktop
Keep standalone notifications in a predictable zone, such as the top of the page, and inline notifications as close as possible to the element they refer to.
Tablet
Same placement as desktop. Leave room for the 40 px close button so it stays comfortable to tap.
Mobile
The title, description and inline link wrap onto several lines, so keep them short. A toast should still fit on one or two lines.
Best practices
Section titled “Best practices”Keep each notification to a single idea, and let users act on it or dismiss it at their own pace.
Do
- Group or queue several notifications rather than showing them all at once.
- Give toasts enough reading time: 3–5 s for a simple success, 6–10 s for informational or reversible messages, and pause on hover and focus.
- Remove an inline notification automatically once the issue is resolved.
- Let non-critical standalone notifications be dismissed, and don’t bring them back unnecessarily.
- Make clear what happens if the user doesn’t act, and limit actions to one primary plus one secondary.
Don't
- Don’t rely on colour alone to communicate severity. Pair it with an icon or text.
- Don’t put critical or irreversible information only in a toast, or use one for an error that needs action.
- Don’t stack more than 2–3 toasts at once.
- Don’t use an inline notification for a message about the whole page, or leave it behind when its field changes.
- Don’t block the main content with a standalone notification unless strictly necessary.
- Don’t hide the way out of an optional action, or turn a notification into a multi-step flow.
Content guidelines
Section titled “Content guidelines”- Title: what happened, in 3–8 words of simple present or past tense.
- Body: optional. Why it happened or what the user can do, in 1–2 sentences.
- Action: a verb and a clear object, such as “Retry submission” rather than “Retry” or “OK”.
- Length: a toast is one line of about 80 characters at most; inline is 1–2 lines; standalone is a title and 3–4 sentences; actionable is a title, a short body and its actions.
- Tone: direct and human, without jargon. Never blame the user: “That email format isn’t valid”, not “You entered the data wrong”.
- Errors: be specific about the cause when known, and say whether and how the user can recover.
- Style: lead with the most important information and use active verbs: “We couldn’t process your payment”. Avoid all caps and exclamation marks.
<div class="tng-notification" role="status"> <div class="tng-notification-header"> <div class="tng-notification-summary"> <i class="tng-icon icon-info" aria-hidden="true"></i> <strong class="tng-notification-title">Title</strong> <span>Description</span> <a class="tng-link is-neutral" href="#">Link</a> </div> <button class="tng-icon-button is-md is-ghost" type="button" aria-label="Dismiss" > <i class="tng-icon icon-close" aria-hidden="true"></i> </button> </div> <p>Body text that adds context.</p> <div class="tng-notification-actions"> <a class="tng-link is-neutral" href="#"> <i class="tng-icon icon-link" aria-hidden="true"></i> <span>Link</span> </a> <button class="tng-button is-tertiary is-ghost" type="button"> Action </button> </div></div>Every part is optional: leave out what you don’t need. Without a close button, the header shrinks to its text.
<div class="tng-notification is-success" role="status"> <div class="tng-notification-header"> <div class="tng-notification-summary"> <i class="tng-icon icon-check" aria-hidden="true"></i> <strong class="tng-notification-title">Changes saved</strong> </div> </div></div>Variants
Section titled “Variants”The default variant is neutral. Each variant has its own icon: icon-error for error, icon-check for success, and icon-info for the others.
<div class="tng-notification is-error" role="alert"> <div class="tng-notification-header"> <div class="tng-notification-summary"> <i class="tng-icon icon-error" aria-hidden="true"></i> <strong class="tng-notification-title"> We couldn't save the file </strong> </div> </div></div><div class="tng-notification is-info" role="status"> <div class="tng-notification-header"> <div class="tng-notification-summary"> <i class="tng-icon icon-info" aria-hidden="true"></i> <strong class="tng-notification-title"> Maintenance on Sunday </strong> </div> </div></div><div class="tng-notification is-warning" role="status"> <div class="tng-notification-header"> <div class="tng-notification-summary"> <i class="tng-icon icon-info" aria-hidden="true"></i> <strong class="tng-notification-title"> Your session expires soon </strong> </div> </div></div><div class="tng-notification is-success" role="status"> <div class="tng-notification-header"> <div class="tng-notification-summary"> <i class="tng-icon icon-check" aria-hidden="true"></i> <strong class="tng-notification-title">Changes saved</strong> </div> </div></div><div class="tng-notification is-neutral" role="status"> <div class="tng-notification-header"> <div class="tng-notification-summary"> <i class="tng-icon icon-info" aria-hidden="true"></i> <strong class="tng-notification-title"> Copied to clipboard </strong> </div> </div></div>Recipes
Section titled “Recipes”A toast with auto-dismiss that pauses on hover and focus, closes on Escape while focused, and announces through a live region that’s already in the DOM. The styleguide doesn’t ship toast placement, so the recipe positions its own.
A notification is a live message, so it follows the WAI-ARIA Alert pattern and meets WCAG 2.1 AA. An accessible notification is announced without losing the user’s place, stays on screen long enough to read and act on, and never depends on colour alone.
For designers
Section titled “For designers”- Text, icons and controls must meet accessible contrast on every type’s fill. Source: WCAG 1.4.3 Contrast (Minimum).
- Never convey severity by colour alone: combine the icon with text that names the problem. Source: WCAG 1.4.1 Use of Color.
- Never make auto-dismiss the only way to reach important content. Prefer manual dismissal for a notification with actions. Source: WCAG 2.2.1 Timing Adjustable.
For developers
Section titled “For developers”Choose the role by urgency. A toast or other non-critical notification uses role="status", which is announced politely. A critical error or blocking notification uses role="alert", which interrupts the screen reader, so use it sparingly and never for informational or success messages. Source: WCAG 4.1.3 Status Messages.
Screen readers only announce changes to a live region they already know about. For a notification that appears dynamically, keep the empty live region in the DOM and update its content in place, rather than creating the region along with the message. The Toast recipe on the CSS tab shows this wiring.
If a notification auto-dismisses, pause the timer on hover and on focus. Source: WCAG 2.2.1 Timing Adjustable.
Keyboard interaction
Section titled “Keyboard interaction”| Key | Action |
|---|---|
| Tab / Shift + Tab | Move through the notification’s links and buttons |
| Enter / Space | Activate the focused link or button |
| Escape | Dismiss a dismissible notification while focus is inside it |
Focus order
Section titled “Focus order”A notification doesn’t take focus when it appears, so Tab reaches its controls in reading order: the inline link, the close button, the standalone link, then the button. The exception is an actionable notification that needs an immediate decision: move focus to its first control when it opens, and return it to the trigger on close. Source: WCAG 2.4.3 Focus Order.
- Inline link
- Close button
- Standalone link
- Tertiary button
Labelling elements
Section titled “Labelling elements”Give every element the role, name and state assistive technology needs.
Icon
The icon carries aria-hidden="true", since the text must already convey the severity. If it doesn’t, add the severity to the text, such as “Error:”.
Close button
An icon-only button has no text to name it, so give it an aria-label, such as “Dismiss”.
Field message
An inline notification tied to a form field is also referenced from that field’s aria-describedby, in addition to role="alert" when it reports a validation error.