alert-demo.tsx — ui Source File
Architecture documentation for alert-demo.tsx, a tsx file in the ui codebase. 3 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 459efa66_7cd1_590d_c879_d0842fdda6b3["alert-demo.tsx"] d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] 459efa66_7cd1_590d_c879_d0842fdda6b3 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 9816548b_ba53_dabd_a625_cfede1b0ea32["alert"] 459efa66_7cd1_590d_c879_d0842fdda6b3 --> 9816548b_ba53_dabd_a625_cfede1b0ea32 57e86e45_ac6e_7278_be08_9092724e8401["button"] 459efa66_7cd1_590d_c879_d0842fdda6b3 --> 57e86e45_ac6e_7278_be08_9092724e8401 1c2403dc_4584_9f39_4e98_855a7de18bd1["component-registry.ts"] 1c2403dc_4584_9f39_4e98_855a7de18bd1 --> 459efa66_7cd1_590d_c879_d0842fdda6b3 style 459efa66_7cd1_590d_c879_d0842fdda6b3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import {
AlertCircleIcon,
BookmarkCheckIcon,
CheckCircle2Icon,
GiftIcon,
PopcornIcon,
ShieldAlertIcon,
} from "lucide-react"
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/registry/new-york-v4/ui/alert"
import { Button } from "@/registry/new-york-v4/ui/button"
export function AlertDemo() {
return (
<div className="grid max-w-xl items-start gap-4">
<Alert>
<CheckCircle2Icon />
<AlertTitle>Success! Your changes have been saved</AlertTitle>
<AlertDescription>
This is an alert with icon, title and description.
</AlertDescription>
</Alert>
<Alert>
<BookmarkCheckIcon>Heads up!</BookmarkCheckIcon>
<AlertDescription>
This one has an icon and a description only. No title.
</AlertDescription>
</Alert>
<Alert>
<AlertDescription>
This one has a description only. No title. No icon.
</AlertDescription>
</Alert>
<Alert>
<PopcornIcon />
<AlertTitle>Let's try one with icon and title.</AlertTitle>
</Alert>
<Alert>
<ShieldAlertIcon />
<AlertTitle>
This is a very long alert title that demonstrates how the component
handles extended text content and potentially wraps across multiple
lines
</AlertTitle>
</Alert>
<Alert>
<GiftIcon />
<AlertDescription>
This is a very long alert description that demonstrates how the
component handles extended text content and potentially wraps across
multiple lines
</AlertDescription>
</Alert>
<Alert>
<AlertCircleIcon />
<AlertTitle>
This is an extremely long alert title that spans multiple lines to
demonstrate how the component handles very lengthy headings while
maintaining readability and proper text wrapping behavior
</AlertTitle>
<AlertDescription>
This is an equally long description that contains detailed information
about the alert. It shows how the component can accommodate extensive
content while preserving proper spacing, alignment, and readability
across different screen sizes and viewport widths. This helps ensure
the user experience remains consistent regardless of the content
length.
</AlertDescription>
</Alert>
<Alert variant="destructive">
<AlertCircleIcon />
<AlertTitle>Something went wrong!</AlertTitle>
<AlertDescription>
Your session has expired. Please log in again.
</AlertDescription>
</Alert>
<Alert variant="destructive">
<AlertCircleIcon />
<AlertTitle>Unable to process your payment.</AlertTitle>
<AlertDescription>
<p>Please verify your billing information and try again.</p>
<ul className="list-inside list-disc text-sm">
<li>Check your card details</li>
<li>Ensure sufficient funds</li>
<li>Verify billing address</li>
</ul>
</AlertDescription>
</Alert>
<Alert>
<CheckCircle2Icon />
<AlertTitle className="max-w-[calc(100%-4rem)] overflow-ellipsis">
The selected emails have been marked as spam.
</AlertTitle>
<Button
size="sm"
variant="outline"
className="absolute top-2.5 right-3 h-6 shadow-none"
>
Undo
</Button>
</Alert>
<Alert className="border-amber-50 bg-amber-50 text-amber-900 dark:border-amber-950 dark:bg-amber-950 dark:text-amber-100">
<CheckCircle2Icon />
<AlertTitle>Plot Twist: This Alert is Actually Amber!</AlertTitle>
<AlertDescription>
This one has custom colors for light and dark mode.
</AlertDescription>
</Alert>
</div>
)
}
Domain
Subdomains
Functions
Dependencies
- alert
- button
- lucide-react
Source
Frequently Asked Questions
What does alert-demo.tsx do?
alert-demo.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in alert-demo.tsx?
alert-demo.tsx defines 1 function(s): AlertDemo.
What does alert-demo.tsx depend on?
alert-demo.tsx imports 3 module(s): alert, button, lucide-react.
What files import alert-demo.tsx?
alert-demo.tsx is imported by 1 file(s): component-registry.ts.
Where is alert-demo.tsx in the architecture?
alert-demo.tsx is located at apps/v4/app/(internal)/sink/components/alert-demo.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/app/(internal)/sink/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free