zalify-ui

Scroll Area

A container component with customizable scrollbars for overflowing content.

React

Usage

Examples

Visibility

Use the scrollbar prop to change the scrollbar visibility behavior.

Scrollbar: auto

Scrollbar: visible

React

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

React

Horizontal

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

React

Virtualization

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

React

Infinite Scroll

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

React

Props

Root

Scrollbar