card-demo.tsx — ui Source File
Architecture documentation for card-demo.tsx, a tsx file in the ui codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 0032847a_64dc_0a4b_c412_db97edf6d0d2["card-demo.tsx"] d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] 0032847a_64dc_0a4b_c412_db97edf6d0d2 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 0032847a_64dc_0a4b_c412_db97edf6d0d2 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 d418ad18_b947_f4e5_6e4c_01100d7a63e4["button"] 0032847a_64dc_0a4b_c412_db97edf6d0d2 --> d418ad18_b947_f4e5_6e4c_01100d7a63e4 40a08bc2_b80f_cbb3_c3f5_f3ceafbb7d31["card"] 0032847a_64dc_0a4b_c412_db97edf6d0d2 --> 40a08bc2_b80f_cbb3_c3f5_f3ceafbb7d31 0664484b_ca55_1267_592f_155e2df6f020["switch"] 0032847a_64dc_0a4b_c412_db97edf6d0d2 --> 0664484b_ca55_1267_592f_155e2df6f020 style 0032847a_64dc_0a4b_c412_db97edf6d0d2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { BellRing, Check } from "lucide-react"
import { cn } from "@/lib/utils"
import { Button } from "@/registry/default/ui/button"
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "@/registry/default/ui/card"
import { Switch } from "@/registry/default/ui/switch"
const notifications = [
{
title: "Your call has been confirmed.",
description: "1 hour ago",
},
{
title: "You have a new message!",
description: "1 hour ago",
},
{
title: "Your subscription is expiring soon!",
description: "2 hours ago",
},
]
type CardProps = React.ComponentProps<typeof Card>
export default function CardDemo({ className, ...props }: CardProps) {
return (
<Card className={cn("w-[380px]", className)} {...props}>
<CardHeader>
<CardTitle>Notifications</CardTitle>
<CardDescription>You have 3 unread messages.</CardDescription>
</CardHeader>
<CardContent className="grid gap-4">
<div className=" flex items-center space-x-4 rounded-md border p-4">
<BellRing />
<div className="flex-1 space-y-1">
<p className="text-sm font-medium leading-none">
Push Notifications
</p>
<p className="text-sm text-muted-foreground">
Send notifications to device.
</p>
</div>
<Switch />
</div>
<div>
{notifications.map((notification, index) => (
<div
key={index}
className="mb-4 grid grid-cols-[25px_1fr] items-start pb-4 last:mb-0 last:pb-0"
>
<span className="flex h-2 w-2 translate-y-1 rounded-full bg-sky-500" />
<div className="space-y-1">
<p className="text-sm font-medium leading-none">
{notification.title}
</p>
<p className="text-sm text-muted-foreground">
{notification.description}
</p>
</div>
</div>
))}
</div>
</CardContent>
<CardFooter>
<Button className="w-full">
<Check /> Mark all as read
</Button>
</CardFooter>
</Card>
)
}
Domain
Subdomains
Functions
Types
Dependencies
- button
- card
- lucide-react
- switch
- utils
Source
Frequently Asked Questions
What does card-demo.tsx do?
card-demo.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 card-demo.tsx?
card-demo.tsx defines 1 function(s): CardDemo.
What does card-demo.tsx depend on?
card-demo.tsx imports 5 module(s): button, card, lucide-react, switch, utils.
Where is card-demo.tsx in the architecture?
card-demo.tsx is located at deprecated/www/registry/default/examples/card-demo.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/examples).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free