---
title: "Sonner"
description: "Toast notifications powered by Sonner and themed to match edbn/ui, with success, info, warning, error, and loading states."
plan: Free
docs: https://ui.edbn.me/docs/components/sonner
---

# Sonner

Toast notifications powered by Sonner and themed to match edbn/ui, with success, info, warning, error, and loading states.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/sonner.json
```

## Dependencies
- npm: lucide-react@^1.33.0, next-themes@^0.4.6, sonner@^2.0.7
- edbn: edbn-base

## Usage

```tsx examples/sonner-basic.tsx
"use client";
import { toast as sonnerToast } from "sonner";
import { Button } from "@/components/ui/button";
import { Toaster } from "@/components/ui/sonner";

export default function SonnerBasicPreview() {
  return (
    <>
      <Button onClick={() => sonnerToast.success("Changes saved")}>
        Show Sonner toast
      </Button>
      <Toaster />
    </>
  );
}
```

## Files
- components/ui/sonner.tsx (60 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
