Home / File/ toaster.tsx — ui Source File

toaster.tsx — ui Source File

Architecture documentation for toaster.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
  d1bdf8ed_3c66_a47e_b70a_c4e4ae7531ce["toaster.tsx"]
  64d95022_f8e1_3e94_bb97_22b3ebca757e["use-toast"]
  d1bdf8ed_3c66_a47e_b70a_c4e4ae7531ce --> 64d95022_f8e1_3e94_bb97_22b3ebca757e
  24b98a33_2ada_5229_61ae_aeb1a46ab80e["toast"]
  d1bdf8ed_3c66_a47e_b70a_c4e4ae7531ce --> 24b98a33_2ada_5229_61ae_aeb1a46ab80e
  style d1bdf8ed_3c66_a47e_b70a_c4e4ae7531ce fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import { useToast } from "@/registry/new-york/hooks/use-toast"
import {
  Toast,
  ToastClose,
  ToastDescription,
  ToastProvider,
  ToastTitle,
  ToastViewport,
} from "@/registry/new-york/ui/toast"

export function Toaster() {
  const { toasts } = useToast()

  return (
    <ToastProvider>
      {toasts.map(function ({ id, title, description, action, ...props }) {
        return (
          <Toast key={id} {...props}>
            <div className="grid gap-1">
              {title && <ToastTitle>{title}</ToastTitle>}
              {description && (
                <ToastDescription>{description}</ToastDescription>
              )}
            </div>
            {action}
            <ToastClose />
          </Toast>
        )
      })}
      <ToastViewport />
    </ToastProvider>
  )
}

Subdomains

Functions

Dependencies

  • toast
  • use-toast

Frequently Asked Questions

What does toaster.tsx do?
toaster.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 toaster.tsx?
toaster.tsx defines 1 function(s): Toaster.
What does toaster.tsx depend on?
toaster.tsx imports 2 module(s): toast, use-toast.
Where is toaster.tsx in the architecture?
toaster.tsx is located at deprecated/www/registry/new-york/ui/toaster.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