File: scroll-area.md | Updated: 11/15/2025
ThemesThemes PrimitivesPrimitives IconsIcons ColorsColors
Documentation Case studies Blog
Search
/
Introduction Getting started Accessibility Releases
Styling Animation Composition Server-side rendering
Accordion
Alert Dialog
Aspect Ratio
Avatar
Checkbox
Collapsible
Context Menu
Dialog
Dropdown Menu
Form
Preview
Hover Card
Label
Menubar
Navigation Menu
One-Time Password Field
Preview
Password Toggle Field
Preview
Popover
Progress
Radio Group
Scroll Area
Select
Separator
Slider
Switch
Tabs
Toast
Toggle
Toggle Group
Toolbar
Tooltip
Accessible Icon Direction Provider Portal Slot Visually Hidden
Components
Augments native scroll functionality for custom, cross-browser styling.
Tags
v1.2.0-beta.50
v1.2.0-beta.49
v1.2.0-beta.48
v1.2.0-beta.47
v1.2.0-beta.46
v1.2.0-beta.45
v1.2.0-beta.44
v1.2.0-beta.43
v1.2.0-beta.42
v1.2.0-beta.41
v1.2.0-beta.40
v1.2.0-beta.39
v1.2.0-beta.38
v1.2.0-beta.37
v1.2.0-beta.36
v1.2.0-beta.35
v1.2.0-beta.34
v1.2.0-beta.33
v1.2.0-beta.32
v1.2.0-beta.31
v1.2.0-beta.30
v1.2.0-beta.29
v1.2.0-beta.28
v1.2.0-beta.27
v1.2.0-beta.26
v1.2.0-beta.25
v1.2.0-beta.24
v1.2.0-beta.23
v1.2.0-beta.22
v1.2.0-beta.21
v1.2.0-beta.20
v1.2.0-beta.19
v1.2.0-beta.18
v1.2.0-beta.17
v1.2.0-beta.16
v1.2.0-beta.15
v1.2.0-beta.14
v1.2.0-beta.13
v1.2.0-beta.12
v1.2.0-beta.11
v1.2.0-beta.10
v1.2.0-beta.9
v1.2.0-beta.8
v1.2.0-beta.7
v1.2.0-beta.6
v1.2.0-beta.5
v1.2.0-beta.4
v1.2.0-beta.3
v1.2.0-beta.2
v1.2.0-beta.1
index.jsxindex.jsxstyles.cssstyles.css
CSS
import * as React from "react";
import { ScrollArea } from "radix-ui";
import "./styles.css";
const TAGS = Array.from({ length: 50 }).map(
(_, i, a) => `v1.2.0-beta.${a.length - i}`,
);
const ScrollAreaDemo = () => (
<ScrollArea.Root className="ScrollAreaRoot">
<ScrollArea.Viewport className="ScrollAreaViewport">
<div style={{ padding: "15px 20px" }}>
<div className="Text">Tags</div>
{TAGS.map((tag) => (
<div className="Tag" key={tag}>
{tag}
</div>
))}
</div>
</ScrollArea.Viewport>
<ScrollArea.Scrollbar
className="ScrollAreaScrollbar"
orientation="vertical"
>
<ScrollArea.Thumb className="ScrollAreaThumb" />
</ScrollArea.Scrollbar>
<ScrollArea.Scrollbar
className="ScrollAreaScrollbar"
orientation="horizontal"
>
<ScrollArea.Thumb className="ScrollAreaThumb" />
</ScrollArea.Scrollbar>
<ScrollArea.Corner className="ScrollAreaCorner" />
</ScrollArea.Root>
);
export default ScrollAreaDemo;
Scrollbar sits on top of the scrollable content, taking up no space.
Scrolling is native; no underlying position movements via CSS transformations.
Shims pointer behaviors only when interacting with the controls, so keyboard controls are unaffected.
Supports Right to Left direction.
Install the component from your command line.
npm install @radix-ui/react-scroll-area
Import all parts and piece them together.
import { ScrollArea } from "radix-ui";
export default () => (
<ScrollArea.Root>
<ScrollArea.Viewport />
<ScrollArea.Scrollbar orientation="horizontal">
<ScrollArea.Thumb />
</ScrollArea.Scrollbar>
<ScrollArea.Scrollbar orientation="vertical">
<ScrollArea.Thumb />
</ScrollArea.Scrollbar>
<ScrollArea.Corner />
</ScrollArea.Root>
);
Contains all the parts of a scroll area.
| Prop | Type | Default |
| --- | --- | --- |
| asChild<br><br>Prop description | boolean | false |
| type<br><br>Prop description | enum<br><br>See full type | "hover" |
| scrollHideDelay<br><br>Prop description | number | 600 |
| dir<br><br>Prop description | enum<br><br>See full type | No default value |
| nonce<br><br>Prop description | string | No default value |
The viewport area of the scroll area.
| Prop | Type | Default |
| --- | --- | --- |
| asChild<br><br>Prop description | boolean | false |
The vertical scrollbar. Add a second Scrollbar with an orientation prop to enable horizontal scrolling.
| Prop | Type | Default |
| --- | --- | --- |
| asChild<br><br>Prop description | boolean | false |
| forceMount<br><br>Prop description | boolean | No default value |
| orientation<br><br>Prop description | enum<br><br>See full type | vertical |
| Data attribute | Values |
| --- | --- |
| [data-state] | "visible" \| "hidden" |
| [data-orientation] | "vertical" \| "horizontal" |
The thumb to be used in ScrollArea.Scrollbar.
| Prop | Type | Default |
| --- | --- | --- |
| asChild<br><br>Prop description | boolean | false |
| Data attribute | Values |
| --- | --- |
| [data-state] | "visible" \| "hidden" |
The corner where both vertical and horizontal scrollbars meet.
| Prop | Type | Default |
| --- | --- | --- |
| asChild<br><br>Prop description | boolean | false |
In most cases, it's best to rely on native scrolling and work with the customization options available in CSS. When that isn't enough, ScrollArea provides additional customizability while maintaining the browser's native scroll behavior (as well as accessibility features, like keyboard scrolling).
Scrolling via keyboard is supported by default because the component relies on native scrolling. Specific keyboard interactions may differ between platforms, so we do not specify them here or add specific event listeners to handle scrolling via key events.
PreviousRadio Group
NextSelect