Sonner
sonner
An opinionated toast component for React.
Toasts
react
notifications
toast
snackbar
message
sonner
Toasts
javascript
npm
frontend
Stars
13k
Weekly
0
Open issues
74
Bundle
~60 kB
Installation
npm install sonnerCode example
import { Toaster, toast } from "sonner";
export function Example() {
return (
<>
<Toaster />
<button type="button" onClick={() => toast.success("Saved")}>
Toast
</button>
</>
);
}Pros & cons
Pros
- Actively maintained by Emil Kowalski
- 0 weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~60 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 74 open issues on GitHub