Home / Function/ ScrollArea() — ui Function Reference

ScrollArea() — ui Function Reference

Architecture documentation for the ScrollArea() function in scroll-area.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  eb90c4af_6d04_d2a6_2e48_c67a8ab86831["ScrollArea()"]
  7e07f821_78c9_dc66_ce35_d8e8f26b8cf5["scroll-area.tsx"]
  eb90c4af_6d04_d2a6_2e48_c67a8ab86831 -->|defined in| 7e07f821_78c9_dc66_ce35_d8e8f26b8cf5
  style eb90c4af_6d04_d2a6_2e48_c67a8ab86831 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/ui/scroll-area.tsx lines 7–28

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>
  )
}

Subdomains

Frequently Asked Questions

What does ScrollArea() do?
ScrollArea() is a function in the ui codebase, defined in apps/v4/examples/radix/ui/scroll-area.tsx.
Where is ScrollArea() defined?
ScrollArea() is defined in apps/v4/examples/radix/ui/scroll-area.tsx at line 7.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free