scroll-area-horizontal-demo.tsx — ui Source File
Architecture documentation for scroll-area-horizontal-demo.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 9500072e_b6c6_3845_41b8_a427b94db3d7["scroll-area-horizontal-demo.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 9500072e_b6c6_3845_41b8_a427b94db3d7 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 3eb36dd7_f51a_1431_02e2_7abafe315718["image"] 9500072e_b6c6_3845_41b8_a427b94db3d7 --> 3eb36dd7_f51a_1431_02e2_7abafe315718 55fa186f_5160_b556_a207_bce9cc67159b["scroll-area"] 9500072e_b6c6_3845_41b8_a427b94db3d7 --> 55fa186f_5160_b556_a207_bce9cc67159b style 9500072e_b6c6_3845_41b8_a427b94db3d7 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/default/ui/scroll-area"
export interface Artwork {
artist: string
art: string
}
export const works: Artwork[] = [
{
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 Malyavko",
art: "https://images.unsplash.com/photo-1494337480532-3725c85fd2ab?auto=format&fit=crop&w=300&q=80",
},
]
export default function ScrollAreaHorizontalDemo() {
return (
<ScrollArea className="w-96 whitespace-nowrap rounded-md border">
<div className="flex w-max space-x-4 p-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="pt-2 text-xs text-muted-foreground">
Photo by{" "}
<span className="font-semibold text-foreground">
{artwork.artist}
</span>
</figcaption>
</figure>
))}
</div>
<ScrollBar orientation="horizontal" />
</ScrollArea>
)
}
Domain
Subdomains
Functions
Types
Dependencies
- image
- react
- scroll-area
Source
Frequently Asked Questions
What does scroll-area-horizontal-demo.tsx do?
scroll-area-horizontal-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 scroll-area-horizontal-demo.tsx?
scroll-area-horizontal-demo.tsx defines 1 function(s): ScrollAreaHorizontalDemo.
What does scroll-area-horizontal-demo.tsx depend on?
scroll-area-horizontal-demo.tsx imports 3 module(s): image, react, scroll-area.
Where is scroll-area-horizontal-demo.tsx in the architecture?
scroll-area-horizontal-demo.tsx is located at deprecated/www/registry/default/examples/scroll-area-horizontal-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