/react-hot-toast

Smoking hot React Notifications ๐Ÿ”ฅ

Primary LanguageTypeScriptMIT LicenseMIT

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

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

Getting started

Install with yarn

yarn add react-hot-toast

Install with NPM

npm install react-hot-toast

Add to <Toaster/> your app

The Toaster will take care of rendering all notifications emitted. Make sure to place it somewhere high up in your app.

import { Toaster } from 'react-hot-toast';

const App = () => {
  return (
    <div>
      <Toaster />
    </div>
  );
};

Create toasts from anywhere

Call toast() anywhere within your app to emit new notifications.

import toast from 'react-hot-toast';

toast.success('Hello World!');

Full Documentation

Find the full API reference on official documentation.

Credits

react-hot-toast was cooked by Timo Lins ๐Ÿ‘จโ€๐Ÿณ