- Docs
- Components
- Scroll Area
Scroll Area
Augments native scroll functionality for custom, cross-browser styling.
Preview
Code
Installation
CLI
Manual
Copy and paste the following code into your project.
Update the import paths to match your project setup.
Usage
Single import
Multiple imports
Examples
Default
Preview
Code
Horizontal
Preview
Code
API Reference
Root
Prop | Type | Default |
---|---|---|
asChild | boolean | false |
type | enum | "hover" |
scrollHideDelay | number | 600 |
dir | enum | |
nonce | string |
Viewport
The viewport area of the scroll area.
Prop | Type | Default |
---|---|---|
asChild | boolean | false |
Scrollbar
The vertical scrollbar. Add a second Scrollbar
with an orientation
prop to enable horizontal scrolling.
Prop | Type | Default |
---|---|---|
asChild | boolean | false |
forceMount | boolean | |
orientation | enum | vertical |