Home / Function/ ScrollBar() — ui Function Reference

ScrollBar() — ui Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f0bd7679_afcb_3eba_5c4e_7727561684bc["ScrollBar()"]
  85b34856_f6c0_cbb4_a758_a0655f7bbf0a["scroll-area.tsx"]
  f0bd7679_afcb_3eba_5c4e_7727561684bc -->|defined in| 85b34856_f6c0_cbb4_a758_a0655f7bbf0a
  style f0bd7679_afcb_3eba_5c4e_7727561684bc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/base/ui/scroll-area.tsx lines 30–52

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-l data-vertical:border-l-transparent",
        className
      )}
      {...props}
    >
      <ScrollAreaPrimitive.Thumb
        data-slot="scroll-area-thumb"
        className="bg-border relative flex-1 rounded-full"
      />
    </ScrollAreaPrimitive.Scrollbar>
  )
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free