Search every page in the navigation.
An opinionated toast component, wired to the active theme.
"use client"
import { toast } from "sonner"
import { Button } from "@/components/ui/button"
export default function SonnerDemo() {
return (
<Button
variant="outline"
onClick={() =>
toast("Event created", {
description: "Sunday, December 3 at 9:00 AM",
action: { label: "Undo", onClick: () => {} },
})
}
>
Show Sonner
</Button>
)
}ziiz carries two toasts. Toast is the Base UI one, driven by a
toast manager you call imperatively. Sonner is the third-party alternative:
it renders its own stack, follows the active theme through next-themes, and
takes a shorter call.
npx shadcn@latest add @ziiz/sonnerMount the Toaster once, near the root of the app.
import { Toaster } from "@/components/ui/sonner"<Toaster />Then call toast from anywhere.
import { toast } from "sonner"
toast("Event created", {
description: "Sunday, December 3 at 9:00 AM",
})