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 0184d074_e38f_bda4_9ebf_8ae540772e75["scroll-area-horizontal-demo.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 0184d074_e38f_bda4_9ebf_8ae540772e75 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 3eb36dd7_f51a_1431_02e2_7abafe315718["image"] 0184d074_e38f_bda4_9ebf_8ae540772e75 --> 3eb36dd7_f51a_1431_02e2_7abafe315718 b194a3bc_2a79_fe32_525b_6b49f9e2f536["scroll-area"] 0184d074_e38f_bda4_9ebf_8ae540772e75 --> b194a3bc_2a79_fe32_525b_6b49f9e2f536 style 0184d074_e38f_bda4_9ebf_8ae540772e75 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as React from "react"
import Image from "next/image"
import { ScrollArea, ScrollBar } from "@/examples/base/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 function ScrollAreaHorizontalDemo() {
return (
<ScrollArea className="w-96 rounded-md border whitespace-nowrap">
<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="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
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 DocumentationAtlas domain, Changelog 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 apps/v4/examples/base/scroll-area-horizontal-demo.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/examples/base).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free