Show Toast

Overview

Use a toast message to confirm a user's action and provide feedback. Toasts are overlaid notifications that stack horizontally and can be dismissed by the user.

Use a toast for one of these types of responses:

  • Info: Inform users that their actions have triggered a process, and they may have to wait for completion before proceeding.

  • Success: Confirm a successful or completed action.

  • Warning: Warning toasts inform users of potential issues related to their actions and guide them to prevent future problems.

  • Error: Communicate an issue preventing a user from completing their current action and can be fixed within their current flow.

In general, use a toast interaction in response to user action. To decide whether you should use Toasts or another type of messaging, jump to Toasts vs. Alert Modal vs. Confirm interaction.

Specifications

PropertyDescription

Title

Text that will be displayed in the header.

Message

Main content message for your alert box.

Variant

Appearance of the alert modal. With or without a header.

Mode

Determines how persistent the toast is. Choose between Dismissible, Pester and Sticky.

Mode definition

  • Dismissible

    • Description: Toasts with the Dismissible mode appears for a short period and then automatically fades away. Users also have the option to dismiss the toast earlier by clicking on it or the close button.

    • Usage: Use this mode for informative messages that are not critical to the user's workflow, allowing them to disappear without requiring user action, thus maintaining a smooth user experience.

    Pester

    • Description: The Pester mode keeps the toast on-screen for a longer duration compared to Dismissible, but it will eventually close after a set time. It does not require immediate attention and allows the user to continue their work, but it persists longer to ensure the user has ample time to read the message.

    • Usage: This mode is best for notifications that hold moderate importance, where you want to ensure that the user has seen the message but it is not urgent enough to interrupt their current task.

    Sticky

    • Description: Toasts set to Sticky mode will remain on the screen indefinitely until the user takes action to dismiss them. They will not fade away automatically.

    • Usage: Reserve Sticky mode for critical alerts that require user attention or action before proceeding. These messages are crucial and should stay in view until the user acknowledges them, ensuring the message has been noticed.

Last updated