# React toast libraries

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

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [Sonner](#sonner) | 226.6M | 13.2K | Aug 2026 | MIT |
| [@radix-ui/react-toast](#radix-ui-react-toast) | 168.4M | 19.5K | Oct 2026 | MIT |
| [Base UI](#base-ui-react) | 109.8M | 11.4K | Oct 2026 | MIT |
| [react-hot-toast](#react-hot-toast) | 19.7M | 11.0K | Sep 2026 | MIT |
| [React-Toastify](#react-toastify) | 19.6M | 13.4K | Oct 2026 | MIT |
| [Notistack](#notistack) | 10.5M | 4.1K | Jan 2025 | MIT |
| [Chakra UI](#chakra-ui-react) | 8.3M | 40.7K | Nov 2026 | MIT |
| [sweetalert2-react-content](#sweetalerttwo-react-content) | 450.3K | 728 | Mar 2026 | MIT |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[Sonner](#sonner) has the most monthly downloads in this comparison, at 226.6M.

## Capabilities

| Library | Pre-styled toast renderer | Promise status helper |
| --- | --- | --- |
| [Sonner](#sonner) | Yes | Yes |
| [@radix-ui/react-toast](#radix-ui-react-toast) | No | No |
| [Base UI](#base-ui-react) | No | Yes |
| [react-hot-toast](#react-hot-toast) | Yes | Yes |
| [React-Toastify](#react-toastify) | Yes | Yes |
| [Notistack](#notistack) | Yes | No |
| [Chakra UI](#chakra-ui-react) | Yes | Yes |
| [sweetalert2-react-content](#sweetalerttwo-react-content) | Yes | No |

## Libraries

### Sonner

[GitHub](https://github.com/emilkowalski/sonner) · [npm](https://www.npmjs.com/package/sonner) · [Docs](https://sonner.emilkowal.ski/toast)

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
- Capabilities: [From the Sonner docs](https://sonner.emilkowal.ski/toast)

**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.

**Watch out for**

- **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.

```sh
npm install react@18.3.1 react-dom@18.3.1 sonner@2.0.8
```

**calcom/cal.diy** (50.1K stars)

[calcom/cal.diy](https://github.com/calcom/cal.diy) 

```tsx
export function showToast(
  message: string,
  variant: ToastVariants,
  options: number | ExternalToast = TOAST_VISIBLE_DURATION
) {
  const _options: ExternalToast = typeof options === "number" ? { duration: options } : options;
  if (!_options.duration) _options.duration = TOAST_VISIBLE_DURATION;
  if (!_options.position) _options.position = "bottom-center";

  const onClose = (toastId: string | number) => {
    toast.dismiss(toastId);
  };

  const toastElements: { [x in ToastVariants]: (t: number | string) => JSX.Element } = {
    success: (toastId) => <SuccessToast message={message} onClose={onClose} toastId={toastId} />,
    error: (toastId) => <ErrorToast message={message} onClose={onClose} toastId={toastId} />,
    warning: (toastId) => <WarningToast message={message} onClose={onClose} toastId={toastId} />,
  };

  return toast.custom(
    toastElements[variant] ||
      ((toastId) => <SuccessToast message={message} onClose={onClose} toastId={toastId} />),
    _options
  );
}

```

[packages/ui/components/toast/showToast.tsx](https://github.com/calcom/cal.diy/blob/ae027bb70e694e2d2c44569f398d6cbcee0389b1/packages/ui/components/toast/showToast.tsx#L76-L100) · [More projects using Sonner →](https://dashboard.exa.ai/playground/search?q=React%20projects%20using%20sonner%20for%20styled%20notification%20adapters%2C%20close%20actions%20and%20provider-bound%20snackbar%20handlers&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
import { Toaster, toast } from 'sonner';

// ...

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

```

From [README.md](https://github.com/emilkowalski/sonner/blob/main/README.md)

### @radix-ui/react-toast

[GitHub](https://github.com/radix-ui/primitives) · [npm](https://www.npmjs.com/package/@radix-ui/react-toast) · [Docs](https://www.radix-ui.com/primitives/docs/components/toast)

Displays a succinct message temporarily.

- Downloads / mo: 168.4M
- Stars: 19.5K
- Last release: 1.3.1
- License: MIT
- Capabilities: [From the @radix-ui/react-toast docs](https://www.radix-ui.com/primitives/docs/components/toast)

```sh
npm install react@18.3.1 react-dom@18.3.1 @radix-ui/react-toast@1.3.1
```

**mem0ai/mem0** (69.2K stars)

[mem0ai/mem0](https://github.com/mem0ai/mem0) 

```tsx
const Toast = React.forwardRef<
  React.ElementRef<typeof ToastPrimitives.Root>,
  React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
    VariantProps<typeof toastVariants>
>(({ className, variant, ...props }, ref) => {
  return (
    <ToastPrimitives.Root
      ref={ref}
      className={cn(toastVariants({ variant }), className)}
      {...props}
    />
  );
});

```

[server/dashboard/src/components/ui/toast.tsx](https://github.com/mem0ai/mem0/blob/fff8a6472512d1bc1a4bccab8c645b65a1df7fe5/server/dashboard/src/components/ui/toast.tsx#L43-L55) · [More projects using @radix-ui/react-toast →](https://dashboard.exa.ai/playground/search?q=%40radix-ui/react-toast%20GitHub%20projects)

**Quickstart**

```tsx
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>
);

```

From [toast.mdx](https://github.com/radix-ui/website/blob/main/data/primitives/docs/components/toast.mdx)

### Base UI

[GitHub](https://github.com/mui/base-ui) · [npm](https://www.npmjs.com/package/@base-ui/react) · [Docs](https://base-ui.com/react/components/tooltip)

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
- Capabilities: [From the Base UI docs](https://base-ui.com/react/components/tooltip)

```sh
npm install @base-ui/react@1.9.0 react@19.2.0 react-dom@19.2.0
```

**Quickstart**

```tsx
"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>
    </>
  );
}

```

From [README.md](https://base-ui.com/react/components/toast) · [Find projects using Base UI →](https://dashboard.exa.ai/playground/search?q=%40base-ui/react%20GitHub%20projects)

### react-hot-toast

[GitHub](https://github.com/timolins/react-hot-toast) · [npm](https://www.npmjs.com/package/react-hot-toast) · [Docs](https://react-hot-toast.com/docs/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
- Capabilities: [From the react-hot-toast docs](https://react-hot-toast.com/docs/toast)

**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.

**Watch out for**

- **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.

```sh
npm install react@18.3.1 react-dom@18.3.1 react-hot-toast@2.6.1
```

**calcom/cal.diy** (50.1K stars)

[calcom/cal.diy](https://github.com/calcom/cal.diy) 

```tsx
export function showToast(
  message: string,
  variant: ToastVariants,
  // Options or duration (duration for backwards compatibility reasons)
  options: number | ToastOptions = TOAST_VISIBLE_DURATION
) {
  //
  const _options: ToastOptions = typeof options === "number" ? { duration: options } : options;
  if (!_options.duration) _options.duration = TOAST_VISIBLE_DURATION;

  const onClose = (toastId: string) => {
    toast.remove(toastId);
  };
  const toastElements: { [x in ToastVariants]: (t: Toast) => JSX.Element } = {
    success: (t) => (
      <SuccessToast message={message} toastVisible={t.visible} onClose={onClose} toastId={t.id} />
    ),
    error: (t) => <ErrorToast message={message} toastVisible={t.visible} onClose={onClose} toastId={t.id} />,
    warning: (t) => (
      <WarningToast message={message} toastVisible={t.visible} onClose={onClose} toastId={t.id} />
    ),
  };
  return toast.custom(
    toastElements[variant] ||
      ((t) => <DefaultToast message={message} toastVisible={t.visible} onClose={onClose} toastId={t.id} />),
    _options
  );
}

```

[packages/ui/components/toast/showToast.tsx](https://github.com/calcom/cal.diy/blob/6a75ef86b011665081706ba7f905b05559ac474b/packages/ui/components/toast/showToast.tsx#L82-L109) · [More projects using react-hot-toast →](https://dashboard.exa.ai/playground/search?q=React%20projects%20using%20react-hot-toast%20for%20styled%20notification%20adapters%2C%20close%20actions%20and%20provider-bound%20snackbar%20handlers&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
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>
  );
};

```

From [README.md](https://github.com/timolins/react-hot-toast/blob/main/README.md)

### React-Toastify

[GitHub](https://github.com/fkhadra/react-toastify) · [npm](https://www.npmjs.com/package/react-toastify) · [Docs](https://fkhadra.github.io/react-toastify/promise/)

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
- Capabilities: [From the React-Toastify docs](https://fkhadra.github.io/react-toastify/promise/)

**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.

**Watch out for**

- **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.

```sh
npm install react@18.3.1 react-dom@18.3.1 react-toastify@11.2.0
```

**growilabs/growi** (1.5K stars)

[growilabs/growi](https://github.com/growilabs/growi) 

```tsx
export const toastError = (
  err: string | Error | Error[],
  option: ToastOptions = toastErrorOption,
): void => {
  const errs = toArrayIfNot(err);

  if (errs.length === 0) {
    return;
  }

  for (const err of errs) {
    const message = typeof err === 'string' ? err : err.message;
    toast.error(message, option);
  }
};

```

[apps/app/src/client/util/toastr.ts](https://github.com/growilabs/growi/blob/a204a427fa955927d31d9b447d51f695f5ae2e1b/apps/app/src/client/util/toastr.ts#L10-L24) · [More projects using React-Toastify →](https://dashboard.exa.ai/playground/search?q=React%20projects%20using%20react-toastify%20for%20styled%20notification%20adapters%2C%20close%20actions%20and%20provider-bound%20snackbar%20handlers&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
  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>
    );
  }

```

From [README.md](https://github.com/fkhadra/react-toastify/blob/main/README.md)

### Notistack

[GitHub](https://github.com/iamhosseindhv/notistack) · [npm](https://www.npmjs.com/package/notistack) · [Docs](https://notistack.com/features/basic)

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
- Capabilities: [From the Notistack docs](https://notistack.com/features/basic)

**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.

**Watch out for**

- **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.

```sh
npm install react@18.3.1 react-dom@18.3.1 notistack@3.0.2
```

**mui/material-ui** (99.3K stars)

[mui/material-ui](https://github.com/mui/material-ui) 

```tsx
function MyApp() {
  const { enqueueSnackbar } = useSnackbar();

  const handleClick = () => {
    enqueueSnackbar('I love snacks.');
  };

  const handleClickVariant = (variant: VariantType) => () => {
    // variant could be success, error, warning, info, or default
    enqueueSnackbar('This is a success message!', { variant });
  };

  return (
    <React.Fragment>
      <Button onClick={handleClick}>Show snackbar</Button>
      <Button onClick={handleClickVariant('success')}>Show success snackbar</Button>
    </React.Fragment>
  );
}

```

[docs/data/material/components/snackbars/IntegrationNotistack.tsx](https://github.com/mui/material-ui/blob/b505fd7b64e92db523198712a5d6716c494e0c66/docs/data/material/components/snackbars/IntegrationNotistack.tsx#L5-L23) · [More projects using Notistack →](https://dashboard.exa.ai/playground/search?q=React%20projects%20using%20notistack%20for%20styled%20notification%20adapters%2C%20close%20actions%20and%20provider-bound%20snackbar%20handlers&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```tsx
import { SnackbarProvider, enqueueSnackbar } from 'notistack';

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

```

From [README.md](https://github.com/iamhosseindhv/notistack/blob/master/README.md)

### Chakra UI

[GitHub](https://github.com/chakra-ui/chakra-ui) · [npm](https://www.npmjs.com/package/@chakra-ui/react) · [Docs](https://chakra-ui.com/docs/components/concepts/overview)

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
- Capabilities: [From the Chakra UI docs](https://chakra-ui.com/docs/components/concepts/overview)

```sh
npm i @chakra-ui/react @emotion/react
```

**apache/airflow** (47.6K stars)

[apache/airflow](https://github.com/apache/airflow) 

```tsx
export const Toaster = () => (
  <Portal>
    <ChakraToaster insetInline={{ mdDown: "4" }} toaster={toaster}>
      {(toast) => (
        <Toast.Root width={{ md: "sm" }}>
          {toast.type === "loading" ? <Spinner color="brand.solid" size="sm" /> : <Toast.Indicator />}
          <Stack flex="1" gap="1" maxWidth="100%">
            {Boolean(toast.title) ? <Toast.Title>{toast.title}</Toast.Title> : undefined}
            {Boolean(toast.description) ? (
              <Toast.Description overflowWrap="break-word" wordBreak="break-word">
                {toast.description}
              </Toast.Description>
            ) : undefined}
          </Stack>
          {toast.action ? <Toast.ActionTrigger>{toast.action.label}</Toast.ActionTrigger> : undefined}
          {Boolean(toast.meta?.closable) ? <Toast.CloseTrigger /> : undefined}
        </Toast.Root>
      )}
    </ChakraToaster>
  </Portal>
);
```

[airflow-core/src/airflow/ui/src/system-components/Toaster/Toaster.tsx](https://github.com/apache/airflow/blob/97054e16194b93a1c7ec7e05f8624c4f86d1074d/airflow-core/src/airflow/ui/src/system-components/Toaster/Toaster.tsx#L23-L43) · [More projects using Chakra UI →](https://dashboard.exa.ai/playground/search?q=%40chakra-ui/react%20GitHub%20projects)

**Quickstart**

```tsx
"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>
  );
}

```

From [README.md](https://chakra-ui.com/docs/components/toast)

### sweetalert2-react-content

[GitHub](https://github.com/sweetalert2/sweetalert2-react-content) · [npm](https://www.npmjs.com/package/sweetalert2-react-content)

Adds React element support to sweetalert2 content.

- Downloads / mo: 450.3K
- Stars: 728
- Last release: 5.1.2
- License: MIT
- Capabilities: [From the sweetalert2-react-content docs](https://github.com/sweetalert2/sweetalert2-react-content)

```sh
npm install react@18.3.1 react-dom@18.3.1 sweetalert2@11.26.25 sweetalert2-react-content@5.1.2
```

**mifi/lossless-cut** (46.1K stars)

[mifi/lossless-cut](https://github.com/mifi/lossless-cut) 

```tsx
export async function openDirToast({ filePath, text, html, ...props }: SweetAlertOptions & { filePath: string }) {
  const swal = text ? toast : ReactSwal;

  // @ts-expect-error todo
  const { value } = await swal.fire<string>({
    ...swalToastOptions,
    showConfirmButton: true,
    confirmButtonText: i18n.t('Show'),
    showCancelButton: true,
    cancelButtonText: i18n.t('Close'),
    text,
    html,
    ...props,
  });
  if (value) showItemInFolder(filePath);
}

```

[src/renderer/src/dialogs/index.tsx](https://github.com/mifi/lossless-cut/blob/33632dc14b4bf5906c4a6ea6136e8b83ecca4658/src/renderer/src/dialogs/index.tsx#L639-L654) · [More projects using sweetalert2-react-content →](https://dashboard.exa.ai/playground/search?q=sweetalert2-react-content%20GitHub%20projects)

**Quickstart**

```tsx
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>
  );
}

```

From [README.md](https://github.com/sweetalert2/sweetalert2-react-content)

## FAQ

### Which React toast library should I use?

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

### What is Sonner?

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

### What is React-Toastify?

[React-Toastify](#react-toastify) displays React notifications with promise tracking, custom content, and update controls.

### What is react-hot-toast?

[react-hot-toast](#react-hot-toast) displays React notifications with promise states, custom JSX, and headless rendering hooks.

### What is notistack?

[Notistack](#notistack) queues and stacks React snackbars through a provider and an enqueue API. It caps how many snackbars display together.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best React toast notification libraries react-toastify react-hot-toast Sonner Notistack code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
