Basic setup
Add the Toaster component
Add the
<Toaster /> component to your app’s component tree. This component renders all active toasts:You only need one
<Toaster /> component in your app. Place it at the root level for best results.Complete example
Here’s a complete working example showing different toast types:Toast positioning
Control where toasts appear on screen using theposition prop:
top-lefttop-center(default)top-rightbottom-leftbottom-centerbottom-right
Customizing duration
Set how long toasts stay visible (in milliseconds):What’s next?
Now that you’ve created your first toast, explore more features:Toast types
Learn about all available toast variants
Customization
Style toasts to match your design
Promise API
Handle async operations with toasts
Toaster options
Configure the Toaster component