Overview
Installation
Usage
Variants
Vertical Scroll
Horizontal Scroll
With ScrollBar Visibility
API Reference
ScrollArea
When to show the scrollbar. Values:
auto · always · scroll · hoverMilliseconds before the scrollbar hides after scrolling stops (when
type="scroll").Additional class names for the outer container. Use this to set
height and width.ScrollBar
Scrollbar direction. Values:
vertical · horizontalAccessibility
- ScrollArea uses
overflow: scrollunder the hood — the content remains keyboard scrollable - Keyboard users can scroll with Arrow keys, Page Up/Down, and Home/End when the scroll area is focused
- Screen readers interact with the content inside ScrollArea directly — no special ARIA attributes are needed
- Ensure the scroll container has a set height/width — without bounds it will expand to fit content and never scroll
Do’s & Don’ts
Do
- Always set an explicit height (or max-height) on the ScrollArea
- Add
<ScrollBar orientation="horizontal" />explicitly for horizontal scrolling - Use
type="always"for sidebars so users always know the list is scrollable - Use inside bounded containers: sidebars, modals, cards
Don't
- Don’t use ScrollArea for full-page scroll — use native page scroll instead
- Don’t nest multiple ScrollAreas — outer and inner scroll compete on trackpad
- Don’t forget to set height — without it, the area will never scroll
- Don’t use for tables — use sticky headers with native table scroll instead