# V scroll area 5

> Basic scroll area

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/v-scroll-area-5).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-scroll-area-5
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-scroll-area-5-light-09cb6d6adb163264.png
- Registry item: https://ui.cnippet.dev/r/v-scroll-area-5.json
- Categories: scroll area
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-scroll-area-5.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/scroll-area`

## Files

### `registry/default/variants/v-scroll-area-5.tsx`

```tsx
import { ScrollArea } from "@/registry/default/ui/scroll-area";

const COLS = 12;
const ROWS = 20;

export default function Particle() {
  return (
    <ScrollArea className="h-56 max-w-sm rounded-lg border">
      <div
        className="grid gap-2 p-3"
        style={{
          gridTemplateColumns: `repeat(${COLS}, 3rem)`,
          width: "max-content",
        }}
      >
        {Array.from({ length: ROWS * COLS }).map((_, i) => (
          <div
            className="flex h-10 w-12 items-center justify-center rounded bg-muted text-muted-foreground text-xs tabular-nums"
            key={i}
          >
            {i + 1}
          </div>
        ))}
      </div>
    </ScrollArea>
  );
}
```
