Sonner – a React toast component with built-in conventions and sensible defaults.
sonner lucide-reactInstall the following dependencies:
Showcases different types of toast notifications such as success, error, warning, info, and promise-based toasts.
Use these to provide instant feedback to users based on actions or system events.
Demonstrates how toast notifications can appear in various screen positions like top-center, bottom-right, or top-left.
Useful for aligning toast placement with your app’s layout or design preferences.
| Prop | Type | Default |
|---|---|---|
| position | top-left,top-center,top-right,bottom-left,bottom-center,bottom-right | - |
| closeButton | boolean | false |
| duration | number | 4000 |
| visibleToasts | number | 3 |
| toastOptions | ToastOptions | - |
| icons | Success,Error,Warning,Info,Loading | - |