# ScrollArea

A bounded reading region that keyboard users can enter and scroll.

- Family: Layout, imported from `mizu-ui` or `mizu-ui/layout`
- Docs: https://mizu.user64bit.world/components/scroll-area
- Source: https://github.com/0xuser64bit/mizu/blob/main/packages/mizu/src/layout/Layout.tsx

## Usage

```tsx
import { ScrollArea, Prose } from "mizu-ui";

export function Example() {
  return (
    <ScrollArea label="Release notes" maxHeight={180}>
      <Prose>
        {Array.from({ length: 8 }, (_, i) => (
          <p key={i}>
            Entry {i + 1}. Each component keeps its own behavior, source and
            usage example available.
          </p>
        ))}
      </Prose>
    </ScrollArea>
  );
}
```

## Copy it with the shadcn CLI

```sh
npx shadcn@latest init 0xuser64bit/mizu/preset # once, where there is no components.json
npx shadcn@latest add 0xuser64bit/mizu/scroll-area 0xuser64bit/mizu/prose
```

## Props

- `label`: `string`. Region name.
- `maxHeight`: `number | string` (default `300`). Height limit.
- `...props`: `HTMLAttributes`. Native div attributes.

## Accessibility

Named region is keyboard-focusable. Native scrolling, overscroll containment and platform scrollbars.

## Motion

Native scroll; no smoothing loop.
