Scroll Area
Augments native scroll functionality for custom, cross-browser styling.
Installation#
pnpm dlx shadcn@latest add @davinciui/scroll-areaUsage#
Composition: ScrollArea wraps content and renders ScrollBar + Corner automatically. Use orientation="horizontal" on ScrollBar for horizontal scrolling.
Composition#
Use the following composition to build a Scroll Area:
ScrollArea
└── ScrollBarAPI Reference#
| Prop | Type | Default |
|---|---|---|
ScrollAreaRoot container. Renders Viewport + ScrollBar + Corner. Accepts className and Base UI Root props. | Component | — |
ScrollBarScrollbar thumb track. Use orientation="vertical" (default) or "horizontal". | Component | — |
orientationOrientation of the scrollbar. | "vertical" | "horizontal" | "vertical" |
classNameAdditional CSS classes. | string | — |
Accessibility#
Base UI gives the viewport role presentation and tabIndex 0 whenever content overflows, so arrow and Page keys scroll it natively. The wrapper adds a visible focus-visible ring; scrollbar thumbs are decorative visuals rather than separately announced controls.
Motion#
A static wrapper primitive with no choreographed motion. Only CSS color and box-shadow transitions occur on viewport focus and scrollbar hover, and there is no prefers-reduced-motion handling beyond those brief color transitions.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

