9.8k

Scroll Area

A native scroll container with custom scrollbars.

API Reference

Installation

Usage

API Reference

ScrollArea

Root component. Styled wrapper for ScrollArea.Root from Base UI with custom scrollbar styling.

ScrollAreaViewport

Scrollable viewport container. Styled wrapper for ScrollArea.Viewport from Base UI.

ScrollAreaScrollbar

Scrollbar track. Styled wrapper for ScrollArea.Scrollbar from Base UI.

ScrollAreaThumb

Scrollbar thumb. Styled wrapper for ScrollArea.Thumb from Base UI.

ScrollAreaCorner

Corner element when both scrollbars are visible. Alias for ScrollArea.Corner from Base UI.

Examples

Scroll Fade

Use scrollFade to mask the viewport edges so content subtly fades in and out as you scroll, hinting that more content is available without adding extra UI chrome.

Horizontal Scroll

Scrollbar Gutter

Enable scrollbarGutter to reserve space for the scrollbar when overflow appears, preventing layout shifts as the bar shows or hides.

Both Scrollbars

Fill viewport (flex layouts)

Use fill when the scroll area wraps a flex column that should stretch to the full viewport height—for example, pinning a footer with mt-auto inside a sidebar. The built-in SidebarContent part already passes fill; opt in manually for custom layouts:

Leave fill at the default (false) for content-sized areas such as lists, comboboxes, and dialogs where overflow should track child height.

Changelog

  • May 29, 2026ScrollArea adds optional fill (default false); pass fill for flex layouts that need the content wrapper to stretch (e.g. sidebar footers with mt-auto).

coss.com ui

Built by and for the team of Cal.com, Inc. — the leading commercial open source company (“coss”).