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";23import { Button } from "@/components/ui/button";45<Button onClick={() => toast("Saved", { tone: "success" })}>Save</Button>6<Toaster />
Composition
Sonner is composed of these parts:
Application├── Trigger calling toast()└── Toaster