Skip to content

Scrollbars

A scrollbar that stays out of the way but never disappears.

The problem

macOS hides the scrollbar until you start scrolling, so a clipped list gives no sign it has more below. And the moment it does appear, it's the grey OS default sitting on top of your design. You either get no affordance or the wrong one.

v1.23.0 — maintenance release
v1.22.0 — maintenance release
v1.21.0 — maintenance release
v1.20.0 — maintenance release
v1.19.0 — maintenance release
v1.18.0 — maintenance release
v1.17.0 — maintenance release
v1.16.0 — maintenance release
v1.15.0 — maintenance release
v1.14.0 — maintenance release
v1.13.0 — maintenance release
v1.12.0 — maintenance release
v1.11.0 — maintenance release
v1.10.0 — maintenance release
v1.9.0 — maintenance release
v1.8.0 — maintenance release
v1.7.0 — maintenance release
v1.6.0 — maintenance release
v1.5.0 — maintenance release
v1.4.0 — maintenance release
v1.3.0 — maintenance release
v1.2.0 — maintenance release
v1.1.0 — maintenance release
v1.0.0 — maintenance release

The native scrollbar hides until you scroll, so the list looks cut off

ScrollArea shows its scrollbar on hover and fades the edges

The scrollbar

The thumb rests narrow and low-contrast, then widens and darkens on hover so it stays quiet until you reach for it. Press R to see the radius follow the shape system. On touch-primary devices the whole thing steps aside for native overflow scrolling, where platform physics beat any custom scrollbar.

The original ships in Radix and Base UI variants. This page uses the native Effect UI ScrollArea. Original scrollbar machinery adapted from Lina.

The fade

The baseline edge treatment is shadcn's scroll-fade, vendored as a CSS utility in the shared stylesheet. A mask dissolves the content toward the edges that have more to scroll, and a scroll-driven animation keeps the true start and end crisp. Drop scroll-fade (or scroll-fade-x ) on the viewport and it rides under the scrollbar — no JavaScript.

Examples

Horizontal

A row wider than its container, faded with the horizontal variant.

Double overflow

A table taller and wider than its box. Both axes get a scrollbar.

API reference

ScrollArea

PropTypeDefaultDescription
orientationvertical | horizontal | bothverticalScrollable axes
shapesharp | rounded | pillroundedTrack and thumb shape
fadebooleanfalseFade the edges with more content
dividersbooleanfalseShow vertical edge dividers where more content follows
classNamestring—Set the scroll frame size and styling
viewportClassNamestring—Style the scrolling viewport
contentClassNamestring—Style the content inside the viewport
Effect UI port notes

These examples use native Effect UI ScrollArea. The comparison pauses while the reader uses either list or has reduced motion enabled.