Toast
Use Toast to show users live, time-sensitive messages about system status changes. Toast variants for four different kinds of messages are provided.
ToastOptions
, | Name | Type | Default | Description |
|---|---|---|---|
id? | | | | A unique id for the toast. Using this toast id consumer can control the behavior of individual toast notifications. Toast messages with same id will only be shown once. |
title | | Title displayed in the toast notification. | |
type? | | | | | 'info' | Type of the notification. Also indicates the color and icon. |
message? | | . | | Message displayed in the toast notification. |
lifespan? | | | info and success: 8000, critical and warning: 'infinite' | The Toast notification will automatically close after a certain period of time given in milliseconds. If 'infinite' is provided, the user must close the toast. |
actions? | . | | Optional actions passed to the toast element, appended on the bottom left. Should only be used to either add a Button or a Link. |
role? | | | | info, success and warning: 'status', critical: 'alert' | Live region roles |
position? | | | | 'bottom-left' | Position of toast |