scroll-area.tsx — ui Source File
Architecture documentation for scroll-area.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 7e07f821_78c9_dc66_ce35_d8e8f26b8cf5["scroll-area.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 7e07f821_78c9_dc66_ce35_d8e8f26b8cf5 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 191e4a89_25e4_f7a3_d5fb_d71d101e0990["utils"] 7e07f821_78c9_dc66_ce35_d8e8f26b8cf5 --> 191e4a89_25e4_f7a3_d5fb_d71d101e0990 9c463da6_747b_38dc_586b_cbb4873070b1["radix-ui"] 7e07f821_78c9_dc66_ce35_d8e8f26b8cf5 --> 9c463da6_747b_38dc_586b_cbb4873070b1 style 7e07f821_78c9_dc66_ce35_d8e8f26b8cf5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { cn } from "@/examples/radix/lib/utils"
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
function ScrollArea({
className,
children,
...props
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
return (
<ScrollAreaPrimitive.Root
data-slot="scroll-area"
className={cn("relative", className)}
{...props}
>
<ScrollAreaPrimitive.Viewport
data-slot="scroll-area-viewport"
className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
>
{children}
</ScrollAreaPrimitive.Viewport>
<ScrollBar />
<ScrollAreaPrimitive.Corner />
</ScrollAreaPrimitive.Root>
)
}
function ScrollBar({
className,
orientation = "vertical",
...props
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
return (
<ScrollAreaPrimitive.ScrollAreaScrollbar
data-slot="scroll-area-scrollbar"
data-orientation={orientation}
orientation={orientation}
className={cn(
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
className
)}
{...props}
>
<ScrollAreaPrimitive.ScrollAreaThumb
data-slot="scroll-area-thumb"
className="bg-border relative flex-1 rounded-full"
/>
</ScrollAreaPrimitive.ScrollAreaScrollbar>
)
}
export { ScrollArea, ScrollBar }
Domain
Subdomains
Functions
Dependencies
- radix-ui
- react
- utils
Source
Frequently Asked Questions
What does scroll-area.tsx do?
scroll-area.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.tsx?
scroll-area.tsx defines 2 function(s): ScrollArea, ScrollBar.
What does scroll-area.tsx depend on?
scroll-area.tsx imports 3 module(s): radix-ui, react, utils.
Where is scroll-area.tsx in the architecture?
scroll-area.tsx is located at apps/v4/examples/radix/ui/scroll-area.tsx (domain: DocumentationAtlas, subdomain: ContentSourcing, directory: apps/v4/examples/radix/ui).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free