React Hot Toast

炙手可热的 React 通知。轻量级的、可定制的、默认的、漂亮的。「Smoking hot React Notifications 🔥 Lightweight, customizable and beautiful by default.」

Github星跟踪图

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.

主要指标

概览
名称与所有者timolins/react-hot-toast
主编程语言TypeScript
编程语言TypeScript (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2020-12-07 22:05:40
推送于2025-02-15 11:43:52
最后一次提交
发布数23
最新版本名称v2.5.2 (发布于 2025-02-15 12:17:49)
第一版名称v0.1.2 (发布于 2020-12-08 23:50:27)
用户参与
星数10.5k
关注者数25
派生数349
提交数340
已启用问题?
问题数258
打开的问题数108
拉请求数48
打开的拉请求数18
关闭的拉请求数30
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?