Home / File/ sonner.tsx — ui Source File

sonner.tsx — ui Source File

Architecture documentation for sonner.tsx, a tsx file in the ui codebase. 2 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  2aaa311e_7ef8_274b_e8c6_ee683a64842c["sonner.tsx"]
  75d25ec8_fe84_91a4_54c6_20dabb286f91["next-themes"]
  2aaa311e_7ef8_274b_e8c6_ee683a64842c --> 75d25ec8_fe84_91a4_54c6_20dabb286f91
  e750d152_1191_1793_7244_99c7f9c595f4["sonner"]
  2aaa311e_7ef8_274b_e8c6_ee683a64842c --> e750d152_1191_1793_7244_99c7f9c595f4
  style 2aaa311e_7ef8_274b_e8c6_ee683a64842c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import { useTheme } from "next-themes"
import { Toaster as Sonner } from "sonner"

type ToasterProps = React.ComponentProps<typeof Sonner>

const Toaster = ({ ...props }: ToasterProps) => {
  const { theme = "system" } = useTheme()

  return (
    <Sonner
      theme={theme as ToasterProps["theme"]}
      className="toaster group"
      toastOptions={{
        classNames: {
          toast:
            "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
          description: "group-[.toast]:text-muted-foreground",
          actionButton:
            "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
          cancelButton:
            "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
        },
      }}
      {...props}
    />
  )
}

export { Toaster }

Subdomains

Functions

Types

Dependencies

  • next-themes
  • sonner

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 ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in sonner.tsx?
sonner.tsx defines 1 function(s): Toaster.
What does sonner.tsx depend on?
sonner.tsx imports 2 module(s): next-themes, sonner.
Where is sonner.tsx in the architecture?
sonner.tsx is located at deprecated/www/registry/new-york/ui/sonner.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/ui).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free