Scroll Area
Themed cross-browser scrollbars for vertical, horizontal, or both axes — content goes straight in.
ScrollArea wraps @radix-ui/react-scroll-area: themed scrollbars that
render consistently across browsers. Content drops straight in — the viewport
and scrollbar compose internally; you size the box.
Installation
import { ScrollArea } from "@iammikz/srui";
Usage
Horizontal — pass orientation="horizontal" (or "both"):
Props
| Prop | Type | Default | Description |
|---|---|---|---|
orientation | "vertical" | "horizontal" | "both" | "vertical" | Which scrollbars to mount |
className | — | — | Sizes the box (h-48, w-56, borders, padding) |
| … | — | — | Radix Root props (type, scrollHideDelay, …) |
Exports
| Export | Notes |
|---|---|
ScrollArea | The box — content in, themed scrollbar(s) out |
ScrollBar | Standalone scrollbar for custom Radix compositions |
ScrollViewport | Escape hatch for raw Radix composition |
Accessibility
Native scrolling semantics are preserved — keyboard and wheel behave exactly like a native overflow container; the styled thumbs are pointer-only conveniences.