Library / SDK
timolins/react-hot-toast avatar
timolins/react-hot-toast

react-hot-toast: one global store, two entry points, and a 13-month gap between releases

Smoking Hot React Notifications 🔥

10,994 stars376 forksTypeScriptMIT

At a glance

What is it?
A TypeScript, MIT-licensed toast library whose README is 139 words long, so the real detail lives in package.json: a separate headless entry point, size-limit budgets, and a documentation site wired in with pnpm link. Here is what that configuration settles for you, and what it leaves open.
Who is it for?
Reach for react-hot-toast when you want a styled default with an escape hatch, and pin v2.6.1 rather than a version range, since the previous minor landed 2025-08-15. Skip it if your app needs a written spec for what a rejected promise renders, a server-side rendering recipe, or an accessibility claim you can hand to an auditor.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 67 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • timolins/react-hot-toast10,994 ★ · +21
Star history
Repository2026-09-222026-11-22
timolins/react-hot-toast11k11k

21 Stars in the last 61 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The Toaster is the only renderer, so an early toast() call has nowhere to go

The getting started snippet shows the whole contract:

jsx
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>
  );
};

The Toaster renders all notifications emitted, and toast() can then be triggered from anywhere. The README says nothing about calling toast() before the Toaster is mounted, about queueing, or about what a user sees in that window, and the getting started snippet gives the Toaster no props, so test that case in your own app.

The 5kb claim and the 5.5 KB ceiling it is checked against are different numbers

The features list advertises less than 5kb including styles. The budget the build is actually measured against sits in package.json:

json
  "size-limit": [
    {
      "path": "dist/index.js",
      "limit": "5.5 KB"
    },
    {
      "path": "dist/index.mjs",
      "limit": "5.5 KB"
    },
    {
      "path": "headless/index.js",
      "limit": "2.5 KB"
    },
    {
      "path": "headless/index.mjs",
      "limit": "2.5 KB"
    }
  ],

A build at 5.4 KB passes and still contradicts the headline figure, and nothing anywhere reports the disagreement. If you are counting bytes against a hard budget of your own, measure the artifact you install rather than the sentence in the README. Note also that dist/index.js and dist/index.mjs are budgeted as separate entries even though both come out of the same tsup build, so a change can land in one module format and not the other.

Two entry points ship alongside raw src, and the main field points at the styled build

The exports map gives "." three keys, types, import, and require, resolving to dist/index.d.ts, dist/index.mjs, and dist/index.js. It gives "./headless" the same three keys, resolving to headless/index.d.ts, headless/index.mjs, and headless/index.js. The files array ships headless, dist, and src. Two consequences follow. The main field is dist/index.js, the styled build. And because src ships, any path you can name inside the package stays importable, including untranspiled TypeScript that has no guarantee of matching a published build. The engines field asks only for node >=10, which is older than the runtime line that resolves exports maps, so the declared floor and the declared entry-point strategy are not the same constraint.

Automatic loader from a promise has no documented failure branch

The Promise API is one bullet in the features list, and the README stops there. There is no code sample, no argument shape, no statement about what renders when a promise rejects, no indication of whether a rejection is visually distinct from a resolution, and no mention of cancelling before the promise settles. The cost lands on whoever wires up a save button. The loading state is handled for you; the success and failure states are not specified anywhere here, and a rejected request that leaves a toast on screen is a case the repository does not rule out. The same gap applies to dismissal timing and to what a click on a toast does, neither of which appears in the getting started snippet.

Contributing means a second install and a pnpm link into the bundled site directory

The top level of the repository includes site/, test/, assets/, and pnpm-lock.yaml, and there is no npm lockfile. The two documented install commands are short:

sh
pnpm add react-hot-toast
sh
npm install react-hot-toast

Consuming the package with either is fine. Working on it is not the same. The setup and link scripts take two installs, then point the root package at the React copies inside the site's node_modules:

json
    "setup": "pnpm i && cd site && pnpm i && cd .. && pnpm run link",
    "link": "pnpm link ./site/node_modules/react && pnpm link ./site/node_modules/react-dom"

Running npm install alone never creates that link, so the React your local build resolves is whatever the docs site pinned. Contributors also inherit a husky pre-commit hook running prettier src --ignore-unknown --write, so src is rewritten before any commit lands.

The size check is a separate command from the test run

The test script is jest --runInBand, a single serial process with no workers, backed by jest.config.js and @testing-library/jest-dom. Size has its own entry, size: size-limit, listed separately in the same scripts block. A .github directory exists at the top level, but nothing visible in the package configuration chains the two commands together. So a build that passes the suite can ship with headless/index.js over 2.5 KB and still look green locally, and the KB figures are only meaningful when someone deliberately runs the size script. If a byte budget matters to your application, add your own check instead of inheriting the assumption that the numbers in package.json are verified on every commit.

Thirteen months separate v2.6.0 from v2.6.1

Three releases are visible: v2.5.2 on 2025-02-15, v2.6.0 on 2025-08-15, and v2.6.1 on 2026-09-16. The patch that closed out the 2.6 line arrived roughly a year after the minor, and the last push to main carries the same date as the v2.6.1 tag, 2026-09-16. The project is not archived and that push is recent, so nothing here is frozen. Still, a year with no published build is a fact to plan around rather than a footnote. Pin an exact version, assume a React upgrade you need will wait for a release instead of riding in on a patch, and check which React version the author actually exercises against.

Accessible is a single word with no ARIA, focus, or motion detail attached

Accessible appears in the features list as a bare word. No roles, no live region choice, no focus behavior, no reduced-motion handling, and no screen reader notes appear in the README, and the getting started snippet renders the Toaster with no props at all. The consequence is that the claim cannot be checked from the source you can read here. You do not learn where focus goes when a toast appears, whether the message is announced, or whether a stack of three keeps the first one reachable. If your acceptance criteria include assistive technology, budget time to test against your own component tree, and read the word in the features list as a starting point rather than a specification.

Editorial conclusion

Reach for react-hot-toast when you want a styled default with an escape hatch, and pin v2.6.1 rather than a version range, since the previous minor landed 2025-08-15. Skip it if your app needs a written spec for what a rejected promise renders, a server-side rendering recipe, or an accessibility claim you can hand to an auditor. The README covers none of those.

Frequently asked questions

How do I use React hot toast with NPM?

Run npm install react-hot-toast, then import toast and the Toaster component from the package. The Toaster has to be mounted somewhere in your tree, and after that toast() can be called from anywhere in the app.

command to install react hot toast

The repository gives two commands, pnpm add react-hot-toast for pnpm and npm install react-hot-toast for npm. Both install the same package, which ships dist, headless, and src directories under an MIT license.

What are the key differences between React Hot Toast and React-Toastify?

This repository does not contain a comparison. What it does set out for react-hot-toast is an MIT license, a promise API described as an automatic loader from a promise, a headless useToaster hook, and size-limit ceilings of 5.5 KB for dist and 2.5 KB for the headless build.

how to use react hot toast in next js

The getting started snippet is plain JSX with no framework wrapper, and the README carries no server-side rendering note, App Router note, or client directive example. The package also declares only node >=10 as its engine, so framework and runtime pairing has to be checked on the documentation site before you rely on it.

react hot toast alternative

The README names no alternative library. It points to the documentation at react-hot-toast.com/docs, advertises customization through the headless useToaster hook, and keeps the styled Toaster as the default. Comparing it against another toast library means reading both repositories yourself.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. timolins/react-hot-toast on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/timolins-react-hot-toast.svg)](https://hysenlabs.com/projects/timolins-react-hot-toast)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/timolins-react-hot-toast.svg)](https://hysenlabs.com/projects/timolins-react-hot-toast)

Was this useful?