React Hot Toast
Add beautiful notifications to your React app
README
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 with [useToaster()](https://react-hot-toast.com/docs/use-toaster)_
Installation
With yarn
- ```sh
- yarn add react-hot-toast
- ```
With NPM
- ```sh
- 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!
- ``` js
- 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.