Skip to content
SevenUI
Sign in
On this page

Scroll Area

Augments native scroll functionality for custom, cross-browser styling, built on the Base UI Scroll Area primitive.

Installation

Bash

Usage

Examples

Horizontal

Content wider than the container (w-max) scrolls on the x-axis with orientation="horizontal".

API reference

ScrollArea

Extends the Base UI Scroll Area Root — all its props apply. Children render inside the Viewport; the matching scrollbar(s) and the Corner are included automatically, so scrollbars are never passed as children. The Viewport becomes keyboard-focusable automatically whenever its content overflows.

PropTypeDefault
orientation"vertical" | "horizontal" | "both""vertical"

ScrollBar

Extends the Base UI Scrollbar part (thumb included).

PropTypeDefault
orientation"vertical" | "horizontal""vertical"

Scrollbars are overlay-style: invisible until hover or scroll (via the data-hovering / data-scrolling attributes). The thumb sizes itself through Base UI’s --scroll-area-thumb-height / -width variables — don’t set its dimensions manually. The Viewport also exposes --scroll-area-overflow-{x,y}-{start,end} variables for scroll-fade masks.

Was this page helpful?