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
  895563cb_46ce_c574_f10a_4f7c01f8b019["toaster.tsx"]
  1d9c6c27_a443_c5fd_35f3_e80b7125bc9f["use-toast"]
  895563cb_46ce_c574_f10a_4f7c01f8b019 --> 1d9c6c27_a443_c5fd_35f3_e80b7125bc9f
  873e9420_c0bc_78ed_8630_206ed9c8f402["toast"]
  895563cb_46ce_c574_f10a_4f7c01f8b019 --> 873e9420_c0bc_78ed_8630_206ed9c8f402
  style 895563cb_46ce_c574_f10a_4f7c01f8b019 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import { useToast } from "@/registry/default/hooks/use-toast"
import {
  Toast,
  ToastClose,
  ToastDescription,
  ToastProvider,
  ToastTitle,
  ToastViewport,
} from "@/registry/default/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/default/ui/toaster.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/ui).

Analyze Your Own Codebase

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

Try Supermodel Free