# JavaScript toast notification libraries

JavaScript toast libraries show short notification messages that appear over a page and close on their own. These libraries confirm events such as a saved setting, a sent message, or a failed upload without interrupting the page.

## 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 |
| [react-hot-toast](#react-hot-toast) | 19.7M | 11.0K | Sep 2026 | MIT |
| [React-Toastify](#react-toastify) | 19.6M | 13.4K | Oct 2026 | MIT |
| [Vue Sonner](#vue-sonner) | 12.0M | 1.5K | Oct 2025 | MIT |
| [Notistack](#notistack) | 10.5M | 4.1K | Jan 2025 | MIT |
| [@zag-js/toast](#zag-js-toast) | 6.8M | 5.3K | Nov 2026 | MIT |
| [SweetAlert2](#sweetalert) | 4.7M | 18.1K | May 2026 | MIT |

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

[Sonner](#sonner) has the most installs, while [SweetAlert2](#sweetalert) has the most GitHub stars.

## Capabilities

| Library | Requires React host | Pre-styled toast renderer |
| --- | --- | --- |
| [Sonner](#sonner) | Yes | Yes |
| [@radix-ui/react-toast](#radix-ui-react-toast) | Yes | No |
| [react-hot-toast](#react-hot-toast) | Yes | Yes |
| [React-Toastify](#react-toastify) | Yes | Yes |
| [Vue Sonner](#vue-sonner) | No | Yes |
| [Notistack](#notistack) | Yes | Yes |
| [@zag-js/toast](#zag-js-toast) | No | No |
| [SweetAlert2](#sweetalert) | No | Yes |

## Libraries

### Sonner

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

Sonner is a styled toast component for React, built around a `Toaster` component that is mounted once in the app and renders the toasts. The `toast` function shows one from anywhere in the code, such as `toast('Saved')`. Variants of that function add action buttons and loading toasts that update when a promise settles. A separate package, [Vue Sonner](#vue-sonner), ports the same component to Vue and Nuxt.

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

- **Compact toast stack.** Toasts stack tightly and expand when someone hovers over them.
- **Action buttons.** Add a button that runs a callback and closes the toast.

**Watch out for**

- **Big restyles go headless.** For a very different look, use the headless option and render custom markup.

```sh
npm install sonner
```

**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=Projects%20using%20sonner%20for%20toast%20notifications&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)

@radix-ui/react-toast is the toast primitive from Radix, published inside the `radix-ui` package. Its parts, `Toast.Provider`, `Toast.Root`, `Toast.Title`, `Toast.Action`, and `Toast.Viewport`, ship unstyled, leaving all of the CSS to the app. Each toast closes after five seconds by default, with a timer that pauses on hover, focus, and window blur. A swipe gesture in the configured direction also dismisses a toast. Unlike [Sonner](#sonner), the primitive has no `toast()` function: each toast renders from React state through the `open` and `onOpenChange` props.

- 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)

**Strengths**

- **Pauses on hover and focus.** The close timer stops on hover, focus, and window blur.
- **Keyboard hotkey to toasts.** A hotkey moves keyboard focus to the toast area.

**Watch out for**

- **No toast() function.** Render toasts from state, or write a custom imperative helper.

```sh
npm install radix-ui
```

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

### 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)

react-hot-toast shows toasts in React through a `toast` function and a `Toaster` component that renders them. The README puts the library under five kilobytes, with its default styles included. A promise passed to the library shows a loading toast that turns into success or error when the promise settles. For a custom design, the `useToaster` hook returns the toast state and leaves the markup to the app, the same split that [Sonner](#sonner) offers in its headless option.

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

- **Fits a custom design.** The useToaster hook handles state, and the app renders the toasts.
- **Promise toasts.** One call shows loading, then success or error, as the promise settles.

**Watch out for**

- **Loading toasts stay open.** Update or dismiss a toast.loading notification when the work finishes.

```sh
npm install react-hot-toast
```

**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=Projects%20using%20react-hot-toast%20for%20toast%20notifications&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/)

React-Toastify shows toasts in React through the `toast` function, after a `ToastContainer` component is mounted once in the app. Each toast shows a progress bar for the time left before it closes. Toasts pause when the window loses focus and close on a swipe. Settings on the container limit how many toasts appear at once, while a single toast can render any React component, update after it opens, or close from code. Right-to-left layouts, dark mode, and stacked notifications are built in.

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

- **Limits visible toasts.** Set how many toasts can show at the same time.
- **Keyboard shortcut to toasts.** Alt+T focuses the first toast, then Tab moves through its controls.

**Watch out for**

- **Needs a ToastContainer.** Mount ToastContainer in the app before calling toast.

```sh
npm install --save react-toastify
```

**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=Projects%20using%20react-toastify%20for%20toast%20notifications&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)

### Vue Sonner

[GitHub](https://github.com/xiaoluoboding/vue-sonner) · [npm](https://www.npmjs.com/package/vue-sonner) · [Docs](https://github.com/xiaoluoboding/vue-sonner/blob/main/README.md)

Vue Sonner is a Vue port of [Sonner](#sonner) with default styles and swipe-to-dismiss. The port keeps Sonner's two parts: a `Toaster` component placed once, plus a `toast` function with variants for success, error, actions, and promises. Nuxt projects add the `vue-sonner/nuxt` module and call `$toast` from any component.

- Downloads / mo: 12.0M
- Stars: 1.5K
- Last release: 2.0.9
- License: MIT
- Capabilities: [From the Vue Sonner docs](https://github.com/xiaoluoboding/vue-sonner/blob/main/README.md)

**Strengths**

- **Nuxt module included.** Add vue-sonner/nuxt to the Nuxt modules, then call $toast in any component.
- **Promise toasts.** One toast.promise call shows loading, then success or error.

**Watch out for**

- **Import the stylesheet.** Import vue-sonner/style.css alongside the Toaster component.

```sh
npm install vue-sonner
```

**aleksey-hoffman/sigma-file-manager** (6.9K stars)

[aleksey-hoffman/sigma-file-manager](https://github.com/aleksey-hoffman/sigma-file-manager) 

```vue
function showStaticToast(title: string, data?: ExternalToast) {
  const rest: Record<string, unknown> = data ? { ...data } : {};
  delete rest.description;
  delete rest.componentProps;

  return sonnerToast.custom(markRaw(ToastStatic), {
    ...(rest as ExternalToast),
    componentProps: {
      data: {
        title,
        description: staticDescription(data),
      },
    },
  });
}

```

[src/components/ui/toaster/app-toast.ts](https://github.com/aleksey-hoffman/sigma-file-manager/blob/5bccf20968850a81b1cbdadff1cb95792dbd8323/src/components/ui/toaster/app-toast.ts#L27-L41) · [More projects using Vue Sonner →](https://dashboard.exa.ai/playground/search?q=vue-sonner%20GitHub%20projects)

**Quickstart**

```vue
<!-- App.vue -->
<template>
  <Toaster />
  <button @click="() => toast('My first toast')">Render a toast</button>
</template>

<script lang="ts" setup>
  import 'vue-sonner/style.css'
  import { Toaster, toast } from 'vue-sonner'
</script>

```

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

### Notistack

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

Notistack shows snackbars, short messages that stack on top of each other, in React. Each one starts with a call such as `enqueueSnackbar('Saved')` after a `SnackbarProvider` component is mounted. Inside that provider, the `useSnackbar` hook gives components the same call. From version three on, the library has no dependency on Material UI, which older versions required as a peer dependency.

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

- **Caps the stack.** Set maxSnack to limit how many snackbars show at once.
- **Blocks duplicate messages.** Turn on preventDuplicate to stop the same message from showing twice.

**Watch out for**

- **Needs a provider.** Wrap the app in SnackbarProvider before calling the useSnackbar hook.

```sh
npm install notistack
```

**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=notistack%20GitHub%20projects)

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

### @zag-js/toast

[GitHub](https://github.com/chakra-ui/zag) · [npm](https://www.npmjs.com/package/@zag-js/toast) · [Docs](https://zagjs.com/components/toast)

@zag-js/toast runs toast behavior as a state machine, a model that moves each toast through a fixed set of states. Zag's adapters connect the machine to React, Solid, Vue, or Svelte, which means a React project also installs `@zag-js/react`. A store made with `toast.createStore` keeps the placement and overlap settings. Calling `toaster.create` adds a toast with a title, a description, and a type such as `info`, `success`, or `loading`. Each type has its own default duration, from two seconds for `success` to no limit for `loading`. Like [@radix-ui/react-toast](#radix-ui-react-toast), the package leaves the toast markup and styles to the app.

- Downloads / mo: 6.8M
- Stars: 5.3K
- Last release: 1.48.0
- License: MIT
- Capabilities: [From the @zag-js/toast docs](https://zagjs.com/components/toast)

**Strengths**

- **Follows promises.** One toast tracks a promise from loading to its result.
- **Priority queue.** Queued toasts wait in priority order.

**Watch out for**

- **The app builds the markup.** Write the toast and toaster components and their styles by hand.

```sh
npm install @zag-js/toast
```

**chakra-ui/ark** (5.5K stars)

[chakra-ui/ark](https://github.com/chakra-ui/ark) 

```tsx
export const Toaster = forwardRef<HTMLDivElement, ToasterProps>((props, ref) => {
  const { toaster, children, label, dir, getRootNode, ...localProps } = props

  const locale = useLocaleContext()
  const env = useEnvironmentContext()

  const service = useMachine(toast.group.machine, {
    store: toaster,
    id: useId(),
    dir: dir ?? locale?.dir,
    getRootNode: getRootNode ?? env?.getRootNode,
  })

  const api = toast.group.connect(service, normalizeProps)

  const mergedProps = mergeProps(api.getGroupProps({ label }), localProps)

  return (
    <ark.div {...mergedProps} ref={ref}>
      {api.getToasts().map((toast, index) => (
        <ToastActor key={toast.id} value={toast} parent={service} index={index}>
          {(ctx) => children(ctx)}
        </ToastActor>
      ))}
    </ark.div>
  )
})

```

[packages/react/src/components/toast/toaster.tsx](https://github.com/chakra-ui/ark/blob/f62ea8c60679f86fc894b39bc9c2018b5449b680/packages/react/src/components/toast/toaster.tsx#L26-L52) · [More projects using @zag-js/toast →](https://dashboard.exa.ai/playground/search?q=%40zag-js/toast%20GitHub%20projects)

**Quickstart**

```tsx
import * as toast from "@zag-js/toast"

const toaster = toast.createStore({
  overlap: true,
  placement: "top-end",
})

toaster.create({
  title: "Hello World",
  description: "This is a toast",
  type: "info",
})

```

From [usage.mdx](https://github.com/chakra-ui/zag/blob/main/website/data/snippets/react/toast/usage.mdx)

### SweetAlert2

[GitHub](https://github.com/sweetalert2/sweetalert2) · [npm](https://www.npmjs.com/package/sweetalert2) · [Docs](https://github.com/sweetalert2/sweetalert2/blob/main/README.md)

SweetAlert2 replaces the browser's `alert`, `confirm`, and `prompt` boxes with styled popup dialogs that follow WAI-ARIA, the web standard for accessible widgets. Setting `toast: true` turns a popup into a small notification that leaves the page usable. `Swal.mixin` saves a set of options, such as toast mode, position, and timer, after which each call to `fire` passes only the message. The package has no dependencies of its own; integration guides for React, Angular, and Laravel are linked from its README.

- Downloads / mo: 4.7M
- Stars: 18.1K
- Last release: 11.26.25
- License: MIT
- Capabilities: [From the SweetAlert2 docs](https://github.com/sweetalert2/sweetalert2/blob/main/README.md)

**Strengths**

- **Reusable toast presets.** Create a toast preset with Swal.mixin, then call fire for each message.
- **Pause the close timer.** Call stopTimer to hold the current toast open.

**Watch out for**

- **Toasts never take focus.** Toast mode doesn't move focus or block the page.
- **HTML isn't sanitized.** Pass untrusted messages as text, or escape them before using html.

```sh
npm install sweetalert2
```

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

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

```typescript
function initSwal(reducedMotion = false) {
  const commonSwalOptions: SweetAlertOptions = {
    target: `#${swalContainerWrapperId}`,
    ...(reducedMotion && {
      showClass: {
        popup: '',
        backdrop: '',
        icon: '',
      },
      hideClass: {
        popup: '',
        backdrop: '',
        icon: '',
      },
    }),
    reverseButtons: dialogButtonOrder === 'ltr',
  };

  Swal = SwalRaw.mixin({
    ...commonSwalOptions,
  });

  toast = Swal.mixin({
    ...commonSwalOptions,
    toast: true,
    width: '50vw',
    position: 'top',
    showConfirmButton: false,
    showCloseButton: true,
    timer: 5000,
    timerProgressBar: true,
    didOpen: (self) => {
      self.addEventListener('mouseenter', Swal.stopTimer);
      self.addEventListener('mouseleave', Swal.resumeTimer);
    },
  });

  ReactSwal = withReactContent(Swal);
}

```

[src/renderer/src/swal.ts](https://github.com/mifi/lossless-cut/blob/4c7ab1cb0c9acaefabb48e997bc909562dc3624d/src/renderer/src/swal.ts#L16-L54) · [More projects using SweetAlert2 →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20sweetalert2%20for%20toast%20notifications&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**

```typescript
import Swal from 'sweetalert2'

const Toast = Swal.mixin({
  toast: true,
  position: 'top-end',
  timer: 3000,
  timerProgressBar: true
})
Toast.fire('Something interesting happened', '', 'info')

```

From [the type definitions](https://github.com/sweetalert2/sweetalert2/blob/main/sweetalert2.d.ts)

## FAQ

### Which JavaScript toast library should I use?

In a React app, use [Sonner](#sonner): add one Toaster component, then call toast from anywhere. Choose [react-hot-toast](#react-hot-toast) for rendering custom toast markup, and [React-Toastify](#react-toastify) to limit how many toasts show at once. On a page with no framework, use [SweetAlert2](#sweetalert).

### How do I show a Sonner toast?

Add `<Toaster />` to the app once, then call `toast('Saved')` from any component. Use `toast.success`, `toast.error`, or `toast.promise` for the common states.

### What does the shadcn/ui toast use?

The shadcn/ui toast component depends on [@radix-ui/react-toast](#radix-ui-react-toast). Radix supplies unstyled, accessible toast parts, and shadcn/ui adds the styles.

### Which toast library works with Vue?

Use [Vue Sonner](#vue-sonner), a Vue port of Sonner that includes a Nuxt module. [@zag-js/toast](#zag-js-toast) also has a Vue adapter for writing custom toast markup.

### Does Radix Toast come with styles?

No. Radix Toast provides unstyled, accessible parts, and the app supplies the CSS. It still closes toasts on a timer, pauses them on hover and focus, and supports swipe to dismiss.

### react-hot-toast vs React-Toastify: which should I use?

Use react-hot-toast to render a custom toast design, since its headless hook manages state without rendering anything. Use React-Toastify for built-in queue limits and a keyboard shortcut that focuses toasts.

## How this page was built

Data checked Nov 18, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best JavaScript toast notification libraries Toastify Notyf iziToast SweetAlert2 Toastr code examples",
    "numResults": 5
  }
}
```

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