Skip to content
Zuno UI
Explore components
EXPLORE
Actions
Forms
Layout
Navigation
Data display
Feedback
Overlays
RESOURCES
Components/ScrollArea

ScrollArea

Usable scrolling with thin overlay scrollbars, without hiding content or controls.

Base UI reference ↗

Installation

Run it from the root of a project already set up with zunoui init.

npx zunoui@latest add scroll-area

Dependencies

What add scroll-area installs alongside the component. The CLI skips any you already have in a compatible version.

ZUNO registry

  • @zuno/utils

npm

Examples

3 examples · 1 component
scroll-area

Vertical list

A fixed-height list named with aria-label.

scroll-area

Horizontal row

orientation="horizontal" for a row of cards.

scroll-area

Both directions

Wide and tall content; both scrollbars and the corner.

API reference

Keeps the props, events and refs of the matching Base UI primitive, plus ZUNO's styles.

PropTypeDefault
orientation

Which scrollbars render; both adds the corner.

"vertical" | "horizontal" | "both""vertical"
className

Size the root (h-72, max-h-96…); the viewport fills it.

string—
overflowEdgeThreshold

Pixels before data-overflow-*-start/end flip, for fade edges.

number0
ScrollBar

Exported for custom layouts; decorative (aria-hidden).

div—

States

The states that apply to this component and their visual treatment.

StateTreatment
IdleScrollbars hidden; content fully visible.
Hover / scrollingThin scrollbar fades in.
FocusInset outline on the viewport when it is focusable.
No overflowNo scrollbar and no tab stop.

Accessibility

Scrolling stays native: wheel, touch, keyboard and assistive tech work as in any overflow container.

The viewport becomes focusable only when it overflows, so keyboard users can scroll it with the arrow keys even when it has no focusable content (a gap in Safari's native behavior).

Pass aria-label (or aria-labelledby) when it holds a list or other meaningful content: the root then becomes a named region. The scrollbars are decorative.

Overlay scrollbars never cover content: they show on hover or while scrolling and the thumb uses the border token.