Open GitHub repository
ComponentsSonner

Sonner

Queues lightweight toast notifications with optional detail and semantic tones.

Installation

bunx @swift-rust/ui add sonner

Usage

tsx
1import { Toaster, toast } from "@/components/ui/sonner";
2 
3import { Button } from "@/components/ui/button";
4 
5<Button onClick={() => toast("Saved", { tone: "success" })}>Save</Button>
6<Toaster />

Composition

Sonner is composed of these parts:

Application
├── Trigger calling toast()
└── Toaster