Smoking hot Notifications for React.
Lightweight, customizable and beautiful by default.
Cooked by Timo Lins π¨βπ³
- π₯ Hot by default
- π© Easily Customizable
- β³ Promise API - Automatic loader from a promise
- π Lightweight - less than 5kb including styles
- β Accessible
- π€― Headless Hooks - Create your own with
useToaster()
pnpm add react-hot-toast
npm install react-hot-toast
Add the Toaster to your app first. It will take care of rendering all notifications emitted. Now you can trigger toast()
from anywhere!
import toast, { Toaster } from 'react-hot-toast';
const notify = () => toast('Here is your toast.');
const App = () => {
return (
<div>
<button onClick={notify}>Make me a toast</button>
<Toaster />
</div>
);
};
Find the full API reference on official documentation.