timolins / react-hot-toast

Smoking Hot React Notifications ๐Ÿ”ฅ
https://react-hot-toast.com
MIT License
9.84k stars 331 forks source link
notifications react snackbar toast-notifications

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

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.