Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Hover Card
- Input
- Input OTP
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
"use client";
import { toast } from "sonner";
import { Button } from "@/components/button/button";
import { Toaster } from "@/components/sonner/sonner";Installation
$ pnpm dlx shadcn@latest add https://shadcn-cssinjs.vercel.app/r/sonner.json
Usage
import { Toaster } from "@/components/ui/sonner/sonner";
import { toast } from "sonner";// Add <Toaster /> to your root layout, then:
toast("Event has been created");RTL
To enable right-to-left support, see the RTL guide.
"use client";
import { toast } from "sonner";
import { useTranslation } from "@/components/language-selector";
import type { Translations } from "@/components/language-selector";API Reference
See the Sonner documentation for the full API reference.