---
title: Scroll Area
description: Augments native scroll functionality for custom, cross-browser styling.
component: true
links:
doc: https://www.radix-ui.com/docs/primitives/components/scroll-area
api: https://www.radix-ui.com/docs/primitives/components/scroll-area#api-reference
---
## Installation
CLI
Manual
```bash
npx shadcn@latest add scroll-area
```
Install the following dependencies:
```bash
npm install @radix-ui/react-scroll-area
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage
```tsx showLineNumbers
import { ScrollArea } from "@/components/ui/scroll-area"
```
```tsx showLineNumbers
Jokester began sneaking into the castle in the middle of the night and leaving
jokes all over the place: under the king's pillow, in his soup, even in the
royal toilet. The king was furious, but he couldn't seem to stop Jokester. And
then, one day, the people of the kingdom discovered that the jokes left by
Jokester were so funny that they couldn't help but laugh. And once they
started laughing, they couldn't stop.
```
## Examples
### Horizontal Scrolling