Park UI

Scroll Area

A container component with customizable scrollbars for overflowing content.

Installation

Usage

Examples

Visibility

Use the scrollbar prop to change the scrollbar visibility behavior.

Scrollbar: auto

Scrollbar: visible

Sizes

Use the size prop to change the size of the scroll area. This affects the scrollbar thickness and content padding.

Size: xs

Size: sm

Size: md

Size: lg

Horizontal

The scroll area automatically supports horizontal scrolling when content overflows horizontally.

Virtualization

Use @tanstack/react-virtual to handle large datasets efficiently by rendering only visible items.

Infinite Scroll

Here is an example of implementing infinite scroll with the scroll area component.

Props

Root

Scrollbar