# sonner

> An opinionated toast component for React.

Latest version **2.0.8** (published 2026-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install sonner
pnpm add sonner
yarn add sonner
bun add sonner
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high quality score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.8 |
| Published | 2026-08-09 |
| First published | 2023-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 169.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12989 |
| Author | Emil Kowalski |
| Maintainers | emilkowalski |
| Keywords | react, notifications, toast, snackbar, message |

## Links

- npm: https://www.npmjs.com/package/sonner
- Repository: https://github.com/emilkowalski/sonner
- Homepage: https://sonner.emilkowal.ski/
- Issues: https://github.com/emilkowalski/sonner/issues
- npm.io page: https://npm.io/package/sonner

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 2.0.8 (latest) — 2026-08-09
- 2.0.0-beta.3 (beta) — 2025-02-16
- 2.0.7 — 2025-08-02
- 2.0.6 — 2025-07-03
- 2.0.5 — 2025-06-02
- 2.0.4 — 2025-05-30
- 2.0.3 — 2025-04-01
- 2.0.2 — 2025-03-27
- 2.0.1 — 2025-02-20
- 2.0.0 — 2025-02-18
- 2.0.0-beta.2 — 2025-02-13
- 2.0.0-beta.1 — 2025-02-09
- 2.0.0-beta.0 — 2025-02-09
- 1.7.4 — 2025-01-31
- 1.7.3 — 2025-01-29
- … 50 more at https://npm.io/package/sonner/versions

## README

https://github.com/vallezw/sonner/assets/50796600/59b95cb7-9068-4f3e-8469-0b35d9de5cf0

[Sonner](https://sonner.emilkowal.ski/) is an opinionated toast component for React. You can read more about why and how it was built [here](https://emilkowal.ski/ui/building-a-toast-component).

## Usage

To start using the library, install it in your project:

```bash
npm install sonner
```

Add `<Toaster />` to your app, it will be the place where all your toasts will be rendered.
After that you can use `toast()` from anywhere in your app.

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

// ...

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

## Documentation

Find the full API reference in the [documentation](https://sonner.emilkowal.ski/getting-started).

---
_Source: https://npm.io/package/sonner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
