Preview

Tags
v1.2.0-beta.50
v1.2.0-beta.49
v1.2.0-beta.48
v1.2.0-beta.47
v1.2.0-beta.46
v1.2.0-beta.45
v1.2.0-beta.44
v1.2.0-beta.43
v1.2.0-beta.42
v1.2.0-beta.41
v1.2.0-beta.40
v1.2.0-beta.39
v1.2.0-beta.38
v1.2.0-beta.37
v1.2.0-beta.36

Installation

<> import.ts
import { ScrollArea } from "@/components/ui/scroll-area"

Code

<> component.tsx
import { ScrollArea } from "@/components/ui/scroll-area"

<ScrollArea />

API Reference

ScrollArea

Scrollable container with sticky title and optional borders.

<> import.ts
import { ScrollArea, ScrollAreaPresets } from "@/components/ui/scroll-area"

Props

PropTypeDefaultDescription
children
React.ReactNodeItems to render as rows
className
string""Additional CSS classes
maxHeight
string"max-h-48"Max height utility
title
stringOptional sticky header title
showBorder
booleantrueShow border around area
size
"sm" | "md" | "lg""md"Spacing scale

Presets

small

Small height with border

medium

Medium height with border

large

Large height with border