# ScrollArea

> A scroll container with thin themed scrollbars (10px track, `border`-coloured thumb) that appear on hover.

## Facts

- **Product**: Max
- **Family**: Layout
- **Global**: `window.DigitalCrew.ScrollArea`
- **Source**: `max-agent: src/components/ui/scroll-area.tsx`
- **Import in the app**: `import { ScrollArea } from "@/components/ui/scroll-area";`
- **Live preview**: /design/components/scroll-area/preview.html
- **Page**: /design/components/scroll-area

## Guidelines

**Use it for** bounded lists inside panels, popovers and cards (members, history, logs). Whole pages scroll natively.

**What you provide**: a fixed height (`className="h-44"`) and the content; `ScrollBar orientation="horizontal"` for wide content.

## API

```ts
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): any;
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): any;
export { ScrollArea, ScrollBar };
```

## Example

```html
<div id="root" class="p-6"></div>
<script>
(function () {
  var h = React.createElement, DC = window.DigitalCrew, I = DC.Icons;
var NAMES = ["Axel Moreau", "Clara Bennett", "Emma Laurent", "Hugo Silva", "Iris Chen", "Jade Lin", "Leo Mercer", "Maya Brooks", "Nolan Park", "Nora Hale", "Orion Reed", "Simon Keller"];
function App() {
  return h(DC.ScrollArea, { className: "h-44 w-72 rounded-md border" },
    h("div", { className: "p-4" },
      h("h4", { className: "mb-3 text-sm font-medium leading-none" }, "Crew"),
      NAMES.map(function (n) { return h("div", { key: n }, h("div", { className: "text-sm py-1.5" }, n), h(DC.Separator, null)); })));
}
  ReactDOM.createRoot(document.getElementById("root")).render(h(DC.TooltipProvider, { delayDuration: 80 }, h(App)));
})();
</script>
```

## More in Layout

- [Accordion](/design/components/accordion.md): Stacked sections that expand one at a time (or several); height animates in 250ms on the smooth-out ease (`--acc-*`).
- [Card](/design/components/card.md): The raised surface for grouped content: `card` fill, `border`, `radius-xl` (14px), `shadow-sm`, 24px padding and gap.
- [Collapsible](/design/components/collapsible.md): Shows and hides one region under its trigger (Radix Collapsible); animates with the accordion tokens.
- [ContentSection](/design/components/content-section.md): The settings-page section: a title, a one-line description, a separator, then a scrolling body.
- [DataTableToolbar](/design/components/data-table-toolbar.md): The toolbar of Max's data-table kit (search, faceted filters, Reset and the View columns menu) and how the kit's pieces fit around a `Table`.
- [Main](/design/components/main.md): The page body of Max's app shell: a `<main>` with the standard page padding and, by default, a centred 7xl width.
- [PanelSplitter](/design/components/panel-splitter.md): The draggable seam between two side-by-side panels; every split view in Max uses it, so one gesture works everywhere.
- [Separator](/design/components/separator.md): A 1px `border` hairline, horizontal or vertical (Radix Separator, decorative by default).
- [Table](/design/components/table.md): The data table primitive: 14px rows with `border` dividers, 40px header cells in medium weight, `muted` at 50% on hover and selection.
