Home / Function/ ToastDestructive() — ui Function Reference

ToastDestructive() — ui Function Reference

Architecture documentation for the ToastDestructive() function in toast-destructive.tsx from the ui codebase.

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

deprecated/www/registry/new-york/examples/toast-destructive.tsx lines 7–25

export default function ToastDestructive() {
  const { toast } = useToast()

  return (
    <Button
      variant="outline"
      onClick={() => {
        toast({
          variant: "destructive",
          title: "Uh oh! Something went wrong.",
          description: "There was a problem with your request.",
          action: <ToastAction altText="Try again">Try again</ToastAction>,
        })
      }}
    >
      Show Toast
    </Button>
  )
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free