# Scroll Area · JGuang UI

> Augments native scroll functionality for custom, cross-browser styling.

- Page: https://jiguang132.com/systems/jguang-ui/docs/components/base/scroll-area
- Based on: shadcn/ui documentation (MIT) @ bc0705384b51252af26dcc65425b216bf5eb063c

> Example `scroll-area-demo`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/scroll-area


## Installation


  

**Command**


  

**Manual**


```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```


### Install the following dependencies:


```bash
npm install @base-ui/react
```


### Copy and paste the following code into your project.


[View complete source: components/ui/scroll-area.tsx](/r/jguang-ui/base/scroll-area.json)


### Update the import paths to match your project setup.


## Usage

```tsx showLineNumbers
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"
```

```tsx showLineNumbers
<ScrollArea className="h-[200px] w-[350px] rounded-md border p-4">
  Your scrollable content here.
</ScrollArea>
```

## Composition

Use the following composition to build a `ScrollArea`:

```text
ScrollArea
└── ScrollBar
```

## Horizontal

Use `ScrollBar` with `orientation="horizontal"` for horizontal scrolling.


> Example `scroll-area-horizontal-demo`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/scroll-area


## RTL

To enable RTL support in JGuang UI, see the [RTL configuration guide](/systems/jguang-ui/docs/rtl).


> Example `scroll-area-rtl`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/scroll-area


## API Reference

See the [Base UI Scroll Area](https://base-ui.com/react/components/scroll-area#api-reference) documentation.

---

Index of all JGuang resources: https://jiguang132.com/llms.txt
