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
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | — | Items to render as rows |
className | string | "" | Additional CSS classes |
maxHeight | string | "max-h-48" | Max height utility |
title | string | — | Optional sticky header title |
showBorder | boolean | true | Show border around area |
size | "sm" | "md" | "lg" | "md" | Spacing scale |
Presets
smallSmall height with border
mediumMedium height with border
largeLarge height with border