react-hot-toast

Smoking hot React Notifications. Lightweight, customizable and beautiful by default.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-hot-toast
2.4.1a year ago3 years agoMinified + gzip package size for react-hot-toast in KB

Readme

react-hot-toast - Try it out
<img src="https://badgen.net/npm/v/react-hot-toast" alt="NPM Version" />
minzipped size
<img src="https://github.com/timolins/react-hot-toast/workflows/CI/badge.svg" alt="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()

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.