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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?