Go to...

Choose a page to open.

Displays a toast, a short message that appears over the page.

Sonner

sonner-demo

Installation

pnpm dlx shadcn@latest add https://ui.n2020.com/r/sonner.json

Usage

Render Toaster once, in the root layout of the application. It reads the theme from next-themes.

import { toast } from "sonner";
import { Toaster } from "@/components/ui/sonner";
<Toaster />

Call toast from anywhere to show a message.

toast("Deploy started");

Examples

Types

sonner-types