Scroll Area
Base UIA constrained viewport with a consistent, unobtrusive scrollbar.
ReadyResponsive
Usage
Package exportimport { ScrollArea } from "@jnpll/elements-ui/scroll-area";
<ScrollArea className="h-56 w-full max-w-sm rounded-lg border">
<div className="p-4">
<h3 className="mb-4 font-medium">{"Activity"}</h3>
{Array.from({ length: 18 }, (_, i) => (
<div key={i} className="border-b py-3 text-sm">Workspace update {i + 1}</div>
))}
</div>
</ScrollArea>Examples
Scrollable content
API Reference
| Prop | Type / description | Default |
|---|---|---|
children | ReactNodeScrollable content. | - |
className | stringDefines viewport dimensions and surface styles. | - |
ScrollBar.orientation | "vertical" | "horizontal"Scrollbar direction; the default ScrollArea includes a vertical bar. | "vertical" |
Composition & accessibility
Give ScrollArea an explicit height to enable vertical scrolling. The exported ScrollBar supports horizontal orientation for custom compositions.