Home / Function/ ToastDemo() — ui Function Reference

ToastDemo() — ui Function Reference

Architecture documentation for the ToastDemo() function in toast-demo.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  ffc3a3e6_5fe0_be43_9a18_886bdcb41137["ToastDemo()"]
  f11bb820_3054_8281_ddc6_6a0b0ab8afe7["toast-demo.tsx"]
  ffc3a3e6_5fe0_be43_9a18_886bdcb41137 -->|defined in| f11bb820_3054_8281_ddc6_6a0b0ab8afe7
  style ffc3a3e6_5fe0_be43_9a18_886bdcb41137 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/default/examples/toast-demo.tsx lines 7–26

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

  return (
    <Button
      variant="outline"
      onClick={() => {
        toast({
          title: "Scheduled: Catch up ",
          description: "Friday, February 10, 2023 at 5:57 PM",
          action: (
            <ToastAction altText="Goto schedule to undo">Undo</ToastAction>
          ),
        })
      }}
    >
      Add to calendar
    </Button>
  )
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free