scroll-area-demo.tsx — ui Source File
Architecture documentation for scroll-area-demo.tsx, a tsx file in the ui codebase. 4 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 3c4daf4e_6ff4_d939_fe82_170a7c3a65af["scroll-area-demo.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 3c4daf4e_6ff4_d939_fe82_170a7c3a65af --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 3eb36dd7_f51a_1431_02e2_7abafe315718["image"] 3c4daf4e_6ff4_d939_fe82_170a7c3a65af --> 3eb36dd7_f51a_1431_02e2_7abafe315718 47fa1d7a_8370_cd8e_01f5_44e7f16431cc["scroll-area"] 3c4daf4e_6ff4_d939_fe82_170a7c3a65af --> 47fa1d7a_8370_cd8e_01f5_44e7f16431cc b2c60dee_4ede_8485_a6b4_91c999cdc69f["separator"] 3c4daf4e_6ff4_d939_fe82_170a7c3a65af --> b2c60dee_4ede_8485_a6b4_91c999cdc69f 1c2403dc_4584_9f39_4e98_855a7de18bd1["component-registry.ts"] 1c2403dc_4584_9f39_4e98_855a7de18bd1 --> 3c4daf4e_6ff4_d939_fe82_170a7c3a65af style 3c4daf4e_6ff4_d939_fe82_170a7c3a65af fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as React from "react"
import Image from "next/image"
import { ScrollArea, ScrollBar } from "@/registry/new-york-v4/ui/scroll-area"
import { Separator } from "@/registry/new-york-v4/ui/separator"
export function ScrollAreaDemo() {
return (
<div className="flex flex-col gap-6">
<ScrollAreaVertical />
<ScrollAreaHorizontalDemo />
</div>
)
}
const tags = Array.from({ length: 50 }).map(
(_, i, a) => `v1.2.0-beta.${a.length - i}`
)
function ScrollAreaVertical() {
return (
<div className="flex flex-col gap-6">
<ScrollArea className="h-72 w-48 rounded-md border">
<div className="p-4">
<h4 className="mb-4 text-sm leading-none font-medium">Tags</h4>
{tags.map((tag) => (
<React.Fragment key={tag}>
<div className="text-sm">{tag}</div>
<Separator className="my-2" />
</React.Fragment>
))}
</div>
</ScrollArea>
</div>
)
}
export const works = [
{
artist: "Ornella Binni",
art: "https://images.unsplash.com/photo-1465869185982-5a1a7522cbcb?auto=format&fit=crop&w=300&q=80",
},
{
artist: "Tom Byrom",
art: "https://images.unsplash.com/photo-1548516173-3cabfa4607e9?auto=format&fit=crop&w=300&q=80",
},
{
artist: "Vladimir Malyav",
art: "https://images.unsplash.com/photo-1494337480532-3725c85fd2ab?auto=format&fit=crop&w=300&q=80",
},
] as const
function ScrollAreaHorizontalDemo() {
return (
<ScrollArea className="w-full max-w-96 rounded-md border p-4">
<div className="flex gap-4">
{works.map((artwork) => (
<figure key={artwork.artist} className="shrink-0">
<div className="overflow-hidden rounded-md">
<Image
src={artwork.art}
alt={`Photo by ${artwork.artist}`}
className="aspect-[3/4] h-fit w-fit object-cover"
width={300}
height={400}
/>
</div>
<figcaption className="text-muted-foreground pt-2 text-xs">
Photo by{" "}
<span className="text-foreground font-semibold">
{artwork.artist}
</span>
</figcaption>
</figure>
))}
</div>
<ScrollBar orientation="horizontal" />
</ScrollArea>
)
}
Domain
Subdomains
Dependencies
- image
- react
- scroll-area
- separator
Source
Frequently Asked Questions
What does scroll-area-demo.tsx do?
scroll-area-demo.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, ContentSourcing subdomain.
What functions are defined in scroll-area-demo.tsx?
scroll-area-demo.tsx defines 4 function(s): ScrollAreaDemo, ScrollAreaHorizontalDemo, ScrollAreaVertical, tags.
What does scroll-area-demo.tsx depend on?
scroll-area-demo.tsx imports 4 module(s): image, react, scroll-area, separator.
What files import scroll-area-demo.tsx?
scroll-area-demo.tsx is imported by 1 file(s): component-registry.ts.
Where is scroll-area-demo.tsx in the architecture?
scroll-area-demo.tsx is located at apps/v4/app/(internal)/sink/components/scroll-area-demo.tsx (domain: DocumentationAtlas, subdomain: ContentSourcing, 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