Smoking hot Notifications for React.
Lightweight, customizable and beautiful by default.
Cooked by Timo Lins ๐จโ๐ณ
Features
๐ฅ Hot by default๐ฉ Easily Customizableโณ Promise API - Automatic loader from a promise๐ Lightweight - less than 5kb including stylesโ Accessible๐คฏ Headless Hooks - Create your own withuseToaster()
Installation
With yarn
yarn add react-hot-toast
With NPM
npm install react-hot-toast
Getting Started
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>
);
};
Documentation
Find the full API reference on official documentation.