---
title: "Scroll Area"
description: "A scroll container with theme-matched scrollbars that keeps native scrolling and keyboard behavior. Built on Base UI."
plan: Free
docs: https://ui.edbn.me/docs/components/scroll-area
---

# Scroll Area

A scroll container with theme-matched scrollbars that keeps native scrolling and keyboard behavior. Built on Base UI.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/scroll-area.json
```

## Dependencies
- npm: @base-ui/react@^1.8.0
- edbn: edbn-base

## Usage

```tsx examples/scroll-area-basic.tsx
"use client";
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";

export default function ScrollAreaBasicPreview() {
  return (
    <ScrollArea className="h-56 w-64 rounded-panel bg-card">
      <div className="space-y-3 p-4">
        {Array.from({ length: 12 }, (_, index) => (
          <p key={index}>Scrollable item {index + 1}</p>
        ))}
      </div>
      <ScrollBar />
    </ScrollArea>
  );
}
```

## Files
- components/ui/scroll-area.tsx (56 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
