React toast libraries

Updated Nov 2026

React toast libraries show brief notifications that appear over the interface and dismiss themselves. A toaster component renders a queue of messages that application code adds through a function call or hook. These libraries let apps confirm saves, report errors, and show the progress of background tasks.

Popularity

Sonner has the most monthly downloads in this comparison, at 226.6M.

LibraryMonthly downloadsStarsLast releaseLicense
Sonner
226.6M
13.2KAug 2026MIT
@radix-ui/react-toast
168.4M
19.5KOct 2026MIT
Base UI
109.8M
11.4KOct 2026MIT
react-hot-toast
19.7M
11.0KSep 2026MIT
React-Toastify
19.6M
13.4KOct 2026MIT
Notistack
10.5M
4.1KJan 2025MIT
Chakra UI
8.3M
40.7KNov 2026MIT
sweetalert2-react-content
450.3K
728Mar 2026MIT
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Provides React toast notifications with action buttons, promise states, and custom JSX.

Downloads / mo
226.6M
Stars
13.2K
Last release
2.0.8
License
MIT

Strengths

  • Includes action and cancel buttons. Attach primary and secondary actions directly to notifications.
  • Supports headless custom content. Render unstyled custom JSX while retaining toast functionality.

Limitations

  • Actions close their toast. Call event.preventDefault() when an action should leave its toast visible.
  • Headless content needs styling. Provide the visual styling when using the unstyled headless renderer.

Quickstart

From README.md
$ npm install react@18.3.1 react-dom@18.3.1 sonner@2.0.8
import { Toaster, toast } from 'sonner';

// ...

function App() {
  return (
    <div>
      <Toaster />
      <button onClick={() => toast('My first toast')}>Give me a toast</button>
    </div>
  );
}

Sonner examples

From open-source projects on GitHub

@radix-ui/react-toast

Displays a succinct message temporarily.

Downloads / mo
168.4M
Stars
19.5K
Last release
1.3.1
License
MIT

Quickstart

From toast.mdx
$ npm install react@18.3.1 react-dom@18.3.1 @radix-ui/react-toast@1.3.1
import { Toast } from "radix-ui";

export default () => (
  <Toast.Provider>
    <Toast.Root>
      <Toast.Description>Saved!</Toast.Description>
      <Toast.Close>Dismiss</Toast.Close>
    </Toast.Root>
    <Toast.Viewport />
  </Toast.Provider>
);

@radix-ui/react-toast examples

From open-source projects on GitHub

Provides headless React components and low-level hooks with full control over CSS and accessibility features.

Downloads / mo
109.8M
Stars
11.4K
Last release
1.9.0
License
MIT

Quickstart

From README.md
$ npm install @base-ui/react@1.9.0 react@19.2.0 react-dom@19.2.0
"use client";
import { Toast } from "@base-ui/react/toast";

export default function App() {
  return <Toast.Provider><Notifications /></Toast.Provider>;
}

function Notifications() {
  const manager = Toast.useToastManager();
  return (
    <>
      <button onClick={() => manager.add({ title: "Saved" })}>Notify</button>
      <Toast.Portal>
        <Toast.Viewport>
          {manager.toasts.map((toast) => (
            <Toast.Root key={toast.id} toast={toast}>
              <Toast.Content><Toast.Title /><Toast.Close>Dismiss</Toast.Close></Toast.Content>
            </Toast.Root>
          ))}
        </Toast.Viewport>
      </Toast.Portal>
    </>
  );
}

react-hot-toast

Displays React notifications with promise states, custom JSX, and headless rendering hooks.

Downloads / mo
19.7M
Stars
11.0K
Last release
2.6.1
License
MIT

Strengths

  • Maps promises to notifications. Update loading notifications automatically when a promise succeeds or fails.
  • Supports a headless renderer. Use the toaster hook to build a custom notification renderer.

Limitations

  • Dismissal preserves the exit animation. Use toast.remove when a notification must disappear immediately.
  • Repeated events need stable identifiers. Provide a permanent identifier to prevent duplicate notifications of the same kind.

Quickstart

From README.md
$ npm install react@18.3.1 react-dom@18.3.1 react-hot-toast@2.6.1
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>
  );
};

react-hot-toast examples

From open-source projects on GitHub

React-Toastify

Displays React notifications with promise tracking, custom content, and update controls.

Downloads / mo
19.6M
Stars
13.4K
Last release
11.2.0
License
MIT

Strengths

  • Tracks promise outcomes. Show pending, success, and error states through the promise helper.
  • Updates existing notifications. Change toast content and options without creating a replacement notification.

Limitations

  • Updates retain previous options. Override inherited content and options explicitly when changing an existing toast.
  • Updates skip transitions by default. Provide a transition or className when updated notifications should animate.

Quickstart

From README.md
$ npm install react@18.3.1 react-dom@18.3.1 react-toastify@11.2.0
  import React from 'react';

  import { ToastContainer, toast } from 'react-toastify';
  
  function App(){
    const notify = () => toast("Wow so easy!");

    return (
      <div>
        <button onClick={notify}>Notify!</button>
        <ToastContainer />
      </div>
    );
  }

React-Toastify examples

From open-source projects on GitHub

Queues and stacks React snackbars through a provider and enqueue API.

Downloads / mo
10.5M
Stars
4.1K
Last release
3.0.2
License
MIT

Strengths

  • Controls concurrent snackbar display. Configure the maximum number of snackbars displayed together.
  • Supports custom snackbar variants. Map named variants to custom components with application-specific properties.

Limitations

  • Persistent snackbars can be evicted. The oldest persistent snackbar is removed when all display slots are occupied.
  • Custom components own their actions. Render action controls inside custom components; the built-in action option does nothing.

Quickstart

From README.md
$ npm install react@18.3.1 react-dom@18.3.1 notistack@3.0.2
import { SnackbarProvider, enqueueSnackbar } from 'notistack';

const App = () => {
  return (
    <div>
      <SnackbarProvider />
      <button onClick={() => enqueueSnackbar('That was easy!')}>Show snackbar</button>
    </div>
  );
};

Notistack examples

From open-source projects on GitHub

Provides responsive, accessible React UI components built with React and Emotion.

Downloads / mo
8.3M
Stars
40.7K
Last release
3.38.0
License
MIT

Quickstart

From README.md
$ npm i @chakra-ui/react @emotion/react
"use client";
import { Provider } from "@/components/ui/provider";
import { Toaster, toaster } from "@/components/ui/toaster";

export default function App() {
  return (
    <Provider>
      <button onClick={() => toaster.create({ title: "Saved" })}>Notify</button>
      <Toaster />
    </Provider>
  );
}

Chakra UI examples

From open-source projects on GitHub

sweetalert2-react-content

Adds React element support to sweetalert2 content.

Downloads / mo
450.3K
Stars
728
Last release
5.1.2
License
MIT

Quickstart

From README.md
$ npm install react@18.3.1 react-dom@18.3.1 sweetalert2@11.26.25 sweetalert2-react-content@5.1.2
import Swal from "sweetalert2";
import withReactContent from "sweetalert2-react-content";
import "sweetalert2/dist/sweetalert2.min.css";

const ReactSwal = withReactContent(Swal);

export default function App() {
  return (
    <button onClick={() => ReactSwal.fire({ toast: true, position: "top-end", showConfirmButton: false, timer: 2000, title: <strong>Saved</strong> })}>
      Show toast
    </button>
  );
}

sweetalert2-react-content examples

From open-source projects on GitHub

FAQ

Sonner suits toasts with action buttons, promise states, and custom JSX. react-hot-toast suits promise-driven notifications with a headless renderer hook. React-Toastify suits notifications that update in place.

Sonner provides React toast notifications with action buttons, promise states, and custom JSX. An action closes its toast unless the handler calls event.preventDefault().

React-Toastify displays React notifications with promise tracking, custom content, and update controls.

react-hot-toast displays React notifications with promise states, custom JSX, and headless rendering hooks.

Notistack queues and stacks React snackbars through a provider and an enqueue API. It caps how many snackbars display together.

For coding agents

Found your toast library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official