Components
Scroll Area
Augments native scroll with a slim, themed scrollbar that appears on interaction — keeping overflowing content contained without the browser's default chrome.
Basic usage
Give the ScrollArea a fixed height so taller content scrolls vertically inside it.
Horizontal scrolling
Add a <ScrollBar orientation="horizontal" /> and a fixed width to scroll a row sideways.
Props
ScrollArea
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Tailwind classes merged onto the root. Set a fixed height/width here (e.g. h-48 w-72) to enable scrolling. |
childrenrequired | React.ReactNode | — | Content rendered inside the scrollable viewport. |
type | 'auto' | 'always' | 'scroll' | 'hover' | 'hover' | When the scrollbar is visible. Forwarded to the Radix Root. |
scrollHideDelay | number | 600 | Milliseconds before the scrollbar hides after the user stops scrolling. |
dir | 'ltr' | 'rtl' | — | Reading direction; flips the scrollbar to the correct side. |
...rest | ScrollArea.Root props | — | All Radix ScrollArea Root props are forwarded. |
ScrollBar
| Prop | Type | Default | Description |
|---|---|---|---|
orientation | 'vertical' | 'horizontal' | 'vertical' | Axis the scrollbar controls. Add an explicit horizontal ScrollBar for sideways scrolling. |
className | string | — | Additional Tailwind classes merged onto the scrollbar track. |
...rest | ScrollAreaScrollbar props | — | All Radix ScrollAreaScrollbar props are forwarded. |
Accessibility
- The viewport is keyboard scrollable — focus it and use Arrow, Page Up/Down, and Home/End keys.
- The viewport shows a brand gold
focus-visiblering so keyboard users can see when the scroll region is focused. - Built on Radix ScrollArea, which preserves native scroll semantics and assistive-technology behavior rather than replacing scrolling with JavaScript.
- Touch and trackpad gestures continue to work normally — the custom scrollbar is purely visual and never blocks pointer or wheel input.