MCPcopy Index your code
hub / github.com/timolins/react-hot-toast

github.com/timolins/react-hot-toast @v2.6.0 sqlite

repository ↗ · DeepWiki ↗ · release v2.6.0 ↗
55 symbols 129 edges 32 files 0 documented · 0% 33 cross-repo links
README

react-hot-toast - Try it out

<img src="https://badgen.net/npm/v/react-hot-toast" alt="NPM Version" />

minzipped size Build Status

Smoking hot Notifications for React.

Lightweight, customizable and beautiful by default.

Website · Documentation · Twitter

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 pnpm

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



      <button onClick={notify}>Make me a toast</button>
      <Toaster />



  );
};

Documentation

Find the full API reference on official documentation.

Extension points exported contracts — how you extend this code

ErrorTheme (Interface)
(no doc)
src/components/error.tsx
ToasterSettings (Interface)
(no doc)
src/core/store.ts
SvgrComponent (Interface)
(no doc)
site/types/svg.d.ts
LoaderTheme (Interface)
(no doc)
src/components/loader.tsx
ToasterState (Interface)
(no doc)
src/core/store.ts
CheckmarkTheme (Interface)
(no doc)
src/components/checkmark.tsx
State (Interface)
(no doc)
src/core/store.ts
ToastBarProps (Interface)
(no doc)
src/components/toast-bar.tsx

Core symbols most depended-on inside this repo

toast
called by 11
src/core/toast.ts
dispatch
called by 7
src/core/store.ts
resolveValue
called by 6
src/core/types.ts
createHandler
called by 5
src/core/toast.ts
createDispatch
called by 4
src/core/store.ts
dispatchAll
called by 2
src/core/store.ts
updateHeight
called by 1
src/components/toaster.tsx
getPositionStyle
called by 1
src/components/toaster.tsx

Shape

Function 42
Interface 12
Enum 1

Languages

TypeScript100%

Modules by API surface

src/core/store.ts10 symbols
src/core/types.ts6 symbols
site/pages/index.tsx5 symbols
src/components/toaster.tsx4 symbols
src/components/toast-bar.tsx4 symbols
src/core/toast.ts3 symbols
site/components/sections/toaster-example.tsx3 symbols
site/components/docs-layout.tsx3 symbols
test/toast.test.tsx2 symbols
site/next.config.mjs2 symbols
site/components/sections/splitbee-counter.tsx2 symbols
src/core/use-toaster.ts1 symbols

Dependencies from manifests, versioned

@jest/types29.6.3 · 1×
@mdx-js/loader2.3.0 · 1×
@mdx-js/react2.3.0 · 1×
@next/mdx12.3.4 · 1×
@size-limit/preset-small-lib7.0.8 · 1×
@svgr/webpack6.5.1 · 1×
@tailwindcss/typography0.5.15 · 1×
@testing-library/react16.1.0 · 1×
@types/jest29.5.14 · 1×
@types/node18.19.68 · 1×
@types/prismjs1.26.5 · 1×

For agents

$ claude mcp add react-hot-toast \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact