Skip to content

Scroll Area

Augments native scroll functionality for custom, cross-browser styling.

Install

Bash
npx @madeui/cli add scroll-area

Usage

TSX
import { ScrollArea, ScrollBar } from '@/components/ui/scroll-area';

Give the ScrollArea a fixed size via style. For horizontal scrolling, add <ScrollBar orientation="horizontal" /> as a child.

Horizontal

API reference

Built on Base UI Scroll Area. ScrollArea composes Root, Viewport, a vertical ScrollBar, and Corner; all props are forwarded to the Base UI Root — see the Base UI Scroll Area API reference. Both exports accept a style prop (StyleXStyles, merged last).

Was this page helpful?