React Hot Toast

Add beautiful notifications to your React app

README

react-hot-toast - Try it out
NPM Version minzipped size Build Status
Smoking hot Notifications for React.
Lightweight, customizable and beautiful by default.
Website · Documentation · Twitter
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


  1. ```sh
  2. yarn add react-hot-toast
  3. ```

With NPM


  1. ```sh
  2. npm install react-hot-toast
  3. ```

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!

  1. ``` js
  2. import toast, { Toaster } from 'react-hot-toast';

  3. const notify = () => toast('Here is your toast.');

  4. const App = () => {
  5.   return (
  6.     <div>
  7.       <button onClick={notify}>Make me a toast</button>
  8.       <Toaster />
  9.     </div>
  10.   );
  11. };
  12. ```

Documentation


Find the full API reference on official documentation.