Basic usage
Toasts are used to provide feedback on user actions or to communicate important information in a limited amount of space. Toasts can be customized with different icons and actions.
Toasts can be displayed with different statuses to indicate the type of message being displayed. The available statuses are success, warning, danger, and info.
Toast Component
A toast can include a single action link that allows users to take action on the message. The action link can be customized with different text and an onClick handler.
Toasts also support icons that can be customized to provide additional context to the message.
ToastProvider and ToastContainer
The ToastProvider component is used to manage the state of toasts in the application. It should be wrapped around the components that will display toasts.
Its counterpart hook useToast can be used to add toasts to the application.
The ToastContainer component is a container for toasts in the application. You should set up at least one ToastContainer in your application to display toasts.
You can use multiple ToastContainer components to display toasts in different parts of the application, which can be useful for displaying toasts in modals or sidebars.
Channels
Toasts can be displayed in different ToastContainer via channels. Channels are used to group toasts together and display them in different ToastContainer components.