PRIMITIVES
ScrollArea
Custom-styled scroll container that replaces native scrollbars with a Memphis-themed track and thumb. Composes @radix-ui/react-scroll-area; both vertical and horizontal scrollbars are wired automatically.
Import
Vertical scroll
Horizontal scroll
ScrollArea wires both vertical and horizontal scrollbars; let the inner content overflow horizontally to surface the horizontal bar.
Props
ScrollArea props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Scrollable content — wrapped in a Radix viewport that handles overflow. |
| className | string | — | Tailwind classes for the outer wrapper. Apply height / width here so overflow is bounded. |
| type | 'auto' | 'always' | 'scroll' | 'hover' | 'hover' | Forwarded to Radix Root. Controls when scrollbars are visible — hover reveals them on pointer hover, always keeps them in place. |
When to use
- Bounded panels with overflowing children (file lists, chat threads, tag carousels).
- When you need consistent scrollbar styling across browsers — native bars vary heavily on Safari / Windows / Linux.
- Skip ScrollArea for the document scroll itself — let the browser handle the page-level scroll for accessibility.