Basic Toast Types
Blank Toast
Create a simple toast without any default icon:Success Toast
Show a success notification with an animated checkmark:iconTheme option.
Error Toast
Display an error notification with an animated error icon:Loading Toast
Show a loading state with a spinner icon:Custom Toasts
Custom Icon
Add a custom icon (emoji or JSX element) to any toast:Custom JSX Toast
Create a completely custom toast with JSX:Advanced Custom Toast
Access the toast lifecycle and properties:Toast Options
All toast types accept options as the second argument:Common Options
- duration: How long the toast should be visible (in milliseconds)
- position: Where to display the toast (
'top-left','top-center','top-right','bottom-left','bottom-center','bottom-right') - unmountDelay: Delay before removing the toast from DOM after dismissal (useful for exit animations)
- icon: Custom icon (emoji string or JSX element)
- id: Custom ID for updating the toast later
Default Durations
Each toast type has a default duration:- Blank: 4000ms (4 seconds)
- Success: 2000ms (2 seconds)
- Error: 4000ms (4 seconds)
- Loading: Infinity (must be dismissed manually)
- Custom: 4000ms (4 seconds)
duration option.