Scroll Area

Custom scrollable container with styled scrollbars

Preview

Installation

Usage

Examples

Fade Edges

Use the fadeEdges prop to add a subtle fade effect at the edges. The fade appears when content is scrollable in that direction and uses CSS masks, so it works over any background.

Scrollbar Gutter

Use the scrollbarGutter prop to reserve space for the scrollbar when content overflows. This prevents layout shift when the scrollbar appears.

Without gutter

With gutter

Persistent Scrollbar

Use the persistScrollbar prop to always show the scrollbar instead of fading it in on hover or scroll.

Horizontal Scroll

Enable horizontal scrolling for wide content.

Both Scrollbars

When content overflows in both directions, both scrollbars appear automatically. The corner prevents them from intersecting.

API Reference

The ScrollArea component is built on top of Base UI's ScrollArea. All Base UI props are supported. The documentation below only covers custom props and modified defaults specific to our implementation.

For the complete Base UI API, see the Base UI ScrollArea documentation.

Props

ScrollArea

Container with styled scrollbars and optional fade effects. Wraps Base UI's ScrollArea.Root.

Prop