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 a922f53d_4725_518b_e0a9_77be31e031d9["scroll-area.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] a922f53d_4725_518b_e0a9_77be31e031d9 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 3d9438e8_7604_787c_4898_907262aff28b["utils"] a922f53d_4725_518b_e0a9_77be31e031d9 --> 3d9438e8_7604_787c_4898_907262aff28b 73fd985d_8aa8_03ff_b628_718471e4602b["scroll-area"] a922f53d_4725_518b_e0a9_77be31e031d9 --> 73fd985d_8aa8_03ff_b628_718471e4602b style a922f53d_4725_518b_e0a9_77be31e031d9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { cn } from "@/examples/base/lib/utils"
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area"
function ScrollArea({
className,
children,
...props
}: ScrollAreaPrimitive.Root.Props) {
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
}: ScrollAreaPrimitive.Scrollbar.Props) {
return (
<ScrollAreaPrimitive.Scrollbar
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-s data-vertical:border-s-transparent",
className
)}
{...props}
>
<ScrollAreaPrimitive.Thumb
data-slot="scroll-area-thumb"
className="bg-border relative flex-1 rounded-full"
/>
</ScrollAreaPrimitive.Scrollbar>
)
}
export { ScrollArea, ScrollBar }
Domain
Subdomains
Functions
Dependencies
- react
- scroll-area
- 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, Changelog 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): react, scroll-area, utils.
Where is scroll-area.tsx in the architecture?
scroll-area.tsx is located at apps/v4/examples/base/ui-rtl/scroll-area.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/examples/base/ui-rtl).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free