Home / Function/ ToastClose() — ui Function Reference

ToastClose() — ui Function Reference

Architecture documentation for the ToastClose() function in toast.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  4fbaced7_7085_f622_b1dc_b04dadd9fe4c["ToastClose()"]
  ee33c9af_7b06_316e_b378_081a76680fee["toast.tsx"]
  4fbaced7_7085_f622_b1dc_b04dadd9fe4c -->|defined in| ee33c9af_7b06_316e_b378_081a76680fee
  style 4fbaced7_7085_f622_b1dc_b04dadd9fe4c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/ui/toast.tsx lines 76–88

>(({ className, ...props }, ref) => (
  <ToastPrimitives.Close
    ref={ref}
    className={cn(
      "absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
      className
    )}
    toast-close=""
    {...props}
  >
    <X className="h-4 w-4" />
  </ToastPrimitives.Close>
))

Subdomains

Frequently Asked Questions

What does ToastClose() do?
ToastClose() is a function in the ui codebase, defined in deprecated/www/registry/new-york/ui/toast.tsx.
Where is ToastClose() defined?
ToastClose() is defined in deprecated/www/registry/new-york/ui/toast.tsx at line 76.

Analyze Your Own Codebase

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

Try Supermodel Free