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 1fd7c6ce_b2d0_1b03_8866_96ce49d92cad["scroll-area.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 1fd7c6ce_b2d0_1b03_8866_96ce49d92cad --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 9c463da6_747b_38dc_586b_cbb4873070b1["radix-ui"] 1fd7c6ce_b2d0_1b03_8866_96ce49d92cad --> 9c463da6_747b_38dc_586b_cbb4873070b1 ef4051f4_aeb7_8d0c_a726_0ba96ad80cf6["utils"] 1fd7c6ce_b2d0_1b03_8866_96ce49d92cad --> ef4051f4_aeb7_8d0c_a726_0ba96ad80cf6 style 1fd7c6ce_b2d0_1b03_8866_96ce49d92cad fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui"
import { cn } from "@/registry/bases/radix/lib/utils"
function ScrollArea({
className,
children,
...props
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
return (
<ScrollAreaPrimitive.Root
data-slot="scroll-area"
className={cn("cn-scroll-area relative", className)}
{...props}
>
<ScrollAreaPrimitive.Viewport
data-slot="scroll-area-viewport"
className="cn-scroll-area-viewport 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(
"cn-scroll-area-scrollbar flex touch-none p-px transition-colors select-none",
className
)}
{...props}
>
<ScrollAreaPrimitive.ScrollAreaThumb
data-slot="scroll-area-thumb"
className="cn-scroll-area-thumb bg-border relative flex-1"
/>
</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 ComponentRegistry domain, ChartRegistry 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/registry/bases/radix/ui/scroll-area.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/bases/radix/ui).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free