Find Similar Packages for react-hot-toast
react-hot-toastSimilar Packages:
Npm Package Weekly Downloads Trend
3 Years
๐ŸŒŸ Show real-time usage chart on react-hot-toast's README.md, just copy the code below.
## Usage Trend
[![Usage Trend of react-hot-toast](https://npm-compare.com/img/npm-trend/THREE_YEARS/react-hot-toast.png)](https://npm-compare.com/react-hot-toast#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
react-hot-toast1,836,472
10,694203 kB1262 months agoMIT
README for react-hot-toast

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()

Installation

With pnpm

pnpm 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.