Skip to content

Scrollbar

Custom scrollbar component, providing a better scrolling experience.

Basic Usage

Control the height of the scrolling area by setting the height property.

Scroll Snap

Combining with the ol-scroll-snap component, scroll snap effect can be achieved. Setting the snap property to both, x, or y enables scroll snap in both horizontal and vertical directions.

Scrollbar Properties

Property NameDescriptionTypeDefault Value
heightHeight of the scrolling areastring | number-
snapScroll snap direction, optional values are x, y, bothstring-

ScrollSnap Properties

Property NameDescriptionTypeDefault Value
alignAlignment of scroll snap, optional values are start, center, endstringcenter