Sonner
weekendsuperhero-io-sistine/sonnerFreeComponent
An opinionated toast component for React.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/Weekendsuperhero-io/sistine/main/public/r/sonner.jsonSource
1"use client";23import { CheckCircleIcon, CircleNotchIcon, InfoIcon, WarningIcon, WarningOctagonIcon } from "@phosphor-icons/react";4import { Toaster as Sonner } from "sonner";56type ToasterProps = React.ComponentProps<typeof Sonner>;78/**9 * Sistine Toaster - Toast notifications with glassmorphism effects10 *11 * Features:12 * - Glass background with backdrop blur13 * - Glass border and shadow effects14 * - Smooth animations and transitions15 * - Light/dark mode support16 *17 * @example18 * ```tsx19 * import { Toaster } from "@/components/ui/sonner"20 * import { toast } from "sonner"21 *22 * // Add to root layout23 * <Toaster />24 *25 * // Use in components26 * toast.success('Success!', { description: 'Your action completed' })27 * ```28 */29const Toaster = ({ theme = "system", ...props }: ToasterProps) => {30 return (31 <Sonner32 theme={theme as ToasterProps["theme"]}33 className="toaster group"34 icons={{35 success: <CheckCircleIcon className="size-4" />,36 info: <InfoIcon className="size-4" />,37 warning: <WarningIcon className="size-4" />,38 error: <WarningOctagonIcon className="size-4" />,39 loading: <CircleNotchIcon className="size-4 animate-spin" />,40 }}41 toastOptions={{42 classNames: {43 toast: "group toast group-[.toaster]:rounded-xl group-[.toaster]:glass group-[.toaster]:glass-border group-[.toaster]:text-foreground",44 description: "group-[.toast]:text-muted-foreground",45 actionButton:46 "group-[.toast]:rounded-md group-[.toast]:glass group-[.toast]:glass-border group-[.toast]:text-foreground group-[.toast]:hover:opacity-90",47 cancelButton:48 "group-[.toast]:rounded-md group-[.toast]:glass group-[.toast]:glass-border group-[.toast]:text-muted-foreground group-[.toast]:hover:opacity-90",49 success:50 "group-[.toast]:border-green-500/30 [&_[data-title]]:text-green-600 dark:[&_[data-title]]:text-green-400 [&_[data-description]]:text-green-600/80! dark:[&_[data-description]]:text-green-400/80! [&_[data-icon]]:text-green-600! dark:[&_[data-icon]]:text-green-400!",51 error:52 "group-[.toast]:border-red-500/30 [&_[data-title]]:text-red-600 dark:[&_[data-title]]:text-red-400 [&_[data-description]]:text-red-600/80! dark:[&_[data-description]]:text-red-400/80! [&_[data-icon]]:text-red-600! dark:[&_[data-icon]]:text-red-400!",53 warning:54// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from weekendsuperhero-io/sistine
All 71 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | weekendsuperhero-io/sistine | Components | Free | 5 deps · 4 files | |
| Alertalert | weekendsuperhero-io/sistine | Components | Free | 3 deps · 4 files | |
| Alert Dialogalert-dialog | weekendsuperhero-io/sistine | Components | Free | 4 deps · 4 files | |
| Auto Foregroundauto-foreground | weekendsuperhero-io/sistine | Components | Free | no deps | |
| Avataravatar | weekendsuperhero-io/sistine | Components | Free | 4 deps · 4 files | |
| Badgebadge | weekendsuperhero-io/sistine | Components | Free | 4 deps · 4 files | |
| Breadcrumbbreadcrumb | weekendsuperhero-io/sistine | Components | Free | 5 deps · 4 files | |
| Buttonbutton | weekendsuperhero-io/sistine | Components | Free | 4 deps · 4 files |
