zanjs / react-hot-toast

Smoking hot React Notifications πŸ”₯

Home Page:https://react-hot-toast.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-hot-toast - Try it out

NPM Version minzipped size Build Status

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


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.

About

Smoking hot React Notifications πŸ”₯

https://react-hot-toast.com

License:MIT License


Languages

Language:TypeScript 85.1%Language:JavaScript 9.0%Language:CSS 5.9%