Component
A composable scrollable container with custom-styled scrollbars. Built from sub-components so you have full control over layout and appearance.
View component changelogUse scrollRestoration="manual" when ScrollArea is the page-level scroller and the viewport should reset after navigation.
Keep the default auto behavior for nested scroll regions, code blocks, chat panes, virtualized lists, and other areas that should preserve their current scroll offset across rerenders.
Pass a stable restoreKey, such as the current pathname, to choose when the reset happens.
Import all parts of the component and piece them together
| Shortcut | Description |
|---|---|
Tab | Moves focus into and out of focusable content inside the viewport. |
ArrowUp | Scrolls vertically when focus is inside the viewport and the focused element does not handle the key. |
ArrowDown | Scrolls vertically when focus is inside the viewport and the focused element does not handle the key. |
ArrowLeft | Scrolls horizontally when focus is inside the viewport and the focused element does not handle the key. |
ArrowRight | Scrolls horizontally when focus is inside the viewport and the focused element does not handle the key. |
PageUp | Scrolls toward the start of the vertical viewport by a larger step. |
PageDown | Scrolls toward the end of the vertical viewport by a larger step. |
Home | Moves to the start of focused scrollable content when the browser provides native scroll handling. |
End | Moves to the end of focused scrollable content when the browser provides native scroll handling. |
| Reference | What Rad UI follows |
|---|---|
ScrollArea does not add a widget role by default. Add role="region" with an accessible name only when the scrollable content should be exposed as a navigable landmark. |