sonner.tsx — ui Source File
Architecture documentation for sonner.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 753876c8_9d09_10ad_5ddd_8fee726ab050["sonner.tsx"] d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] 753876c8_9d09_10ad_5ddd_8fee726ab050 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 75d25ec8_fe84_91a4_54c6_20dabb286f91["next-themes"] 753876c8_9d09_10ad_5ddd_8fee726ab050 --> 75d25ec8_fe84_91a4_54c6_20dabb286f91 e750d152_1191_1793_7244_99c7f9c595f4["sonner"] 753876c8_9d09_10ad_5ddd_8fee726ab050 --> e750d152_1191_1793_7244_99c7f9c595f4 style 753876c8_9d09_10ad_5ddd_8fee726ab050 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import {
CircleCheckIcon,
InfoIcon,
Loader2Icon,
OctagonXIcon,
TriangleAlertIcon,
} from "lucide-react"
import { useTheme } from "next-themes"
import { Toaster as Sonner, type ToasterProps } from "sonner"
const Toaster = ({ ...props }: ToasterProps) => {
const { theme = "system" } = useTheme()
return (
<Sonner
theme={theme as ToasterProps["theme"]}
className="toaster group"
icons={{
success: <CircleCheckIcon className="size-4" />,
info: <InfoIcon className="size-4" />,
warning: <TriangleAlertIcon className="size-4" />,
error: <OctagonXIcon className="size-4" />,
loading: <Loader2Icon className="size-4 animate-spin" />,
}}
style={
{
"--normal-bg": "var(--popover)",
"--normal-text": "var(--popover-foreground)",
"--normal-border": "var(--border)",
"--border-radius": "var(--radius)",
} as React.CSSProperties
}
toastOptions={{
classNames: {
toast: "cn-toast",
},
}}
{...props}
/>
)
}
export { Toaster }
Domain
Subdomains
Functions
Dependencies
- lucide-react
- next-themes
- sonner
Source
Frequently Asked Questions
What does sonner.tsx do?
sonner.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, Changelog subdomain.
What functions are defined in sonner.tsx?
sonner.tsx defines 1 function(s): Toaster.
What does sonner.tsx depend on?
sonner.tsx imports 3 module(s): lucide-react, next-themes, sonner.
Where is sonner.tsx in the architecture?
sonner.tsx is located at apps/v4/examples/radix/ui/sonner.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/examples/radix/ui).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free