Scroll Area
StableAugments native scroll functionality for custom, cross-browser styling.
Examples
Vertical Scrolling
tsx
<ScrollArea className="h-[200px] w-[350px] rounded-md border border-white/10 p-4">
<div className="text-sm text-slate-300">
{/* Long content here */}
</div>
</ScrollArea>Horizontal Scrolling
tsx
<ScrollArea className="w-96 whitespace-nowrap rounded-md border border-white/10">
<div className="flex w-max space-x-4 p-4">
{/* Horizontal items here */}
</div>
<ScrollBar orientation="horizontal" />
</ScrollArea>API Reference
| Property | Description | Type | Default |
|---|---|---|---|
| orientation | The orientation of the scrollbar (on ScrollBar component). | "vertical" | "horizontal" | "vertical" |