Toast

Toasts are non-disruptive messages that appear in the interface to provide quick, at-a-glance feedback on the outcome of an action.

Known issues
Show details
Known issues
Published: July 16, 2025
Updated: September 02, 2025


Anatomy

01-toast-anatomy
  1. Leading icon: (Optional) Visual indicator that reinforces the message
  2. Content: The main message text that provides feedback to the user
  3. Action button: (Optional) Allows users to take a related action like "Undo" or "View Details"
  4. Close button: Allows manual dismissal of the toast

Usage Guidelines

When to use this component

  • When confirming actions performed by users like "Appointment scheduled" or "Info updated"
  • Use to provide quick feedback after form submissions such as "Information saved"
  • Use for temporary status updates like "Connection lost"

When not to use this component

  • For high relevant messages that need to remain in the interface, use the Banner instead
  • For information that users need to reference later
  • For complex messages with multiple actions, use Modal dialog instead
  • For marketing messages or promotional content

Best Practices

Do

Use a Toast to confirm an action taken by the user.

Don't

Do not rely on toasts to be seen, as they are temporary. Keep them short, and do not use them for critical messages.

Do

Use icons for affordance clarity or to highlight the nature of the toast message.

Don't

Don’t use icons for decorative purposes, or that don’t portray the meaning of the toast. In those cases might be better to use text only.

Do

Use a toast for temporary status updates.

Caution

Use the error variant exclusively for systemic errors (for example, no internet connection or error connecting to the database). In other scenarios, the error message needs to go in context, so use patterns embedded in other components.


General Component Behaviors

Max-width

The max-width defined for this component is 360px, which makes its content more direct.

Behavior 01

Stacking

When multiple toasts are triggered, they are displayed in a stack, showing a response to each of the actions the user has taken.

The gap between each toast is --w-space-s.

Behavior 02

Placement

The placement of the toast can be configured, making it possible to display it centered at the top or centered at the bottom of the page. By default, its position is at the bottom of the page.

Behavior 3

Offset

For both bottom and top positions, the toast is displayed --w-space-m away from the edge of the page.

Behavior 4

Time out

By default, the toast is set to disappear after 5000ms. This time can be configured with the timeOut prop.

Behavior 5

Responsive Behavior

Offset

For both bottom and top positions, the toast is displayed --w-space-s away from the edge of the page.

Responsive 01

Variants

Default

By default, this is the status displayed by the component to provide neutral feedback.

Variant 01

Error

To provide feedback more closely related to the error, the “error” status of the component is displayed.

Variant 02

Text alone

Only displays content in text format.

Variant 03

Leading icon

In addition to the text content, it displays an icon that helps reinforce the message being conveyed.

Variant 04

Trailing action

Apart from the text content, it also displays an action closely related to the action that has just been performed.

Variant 05

Icon and action

Both the icon and the action are displayed, along with the text content.

Variant 06

Content Guidelines

Content

  • Should be brief. 2 most important ones are
    • success: when user action was completed (like adding/activating something)
    • danger: when the action completed by the user is a definitive one (like deleting something).
  • Messages should be scannable at a glance and provide clear value to the user.

Actions

  • They should be 3 words max and describe what can a user expect after clicking them.
  • Terminology used for actions must be consistent throughout the product.

 

For further information, see the Content Styleguide.


Known Gaps

  • Redefine limits for component content (max-lengths for action and toast content text)
  • Additional accessibility score details and guidelines.