Scrollbar

Used to replace the browser's native scrollbar.

Basic usage

Horizontal scroll

Max height

Manual scroll

API

Attributes

NameDescriptionTypeDefault
heightheight of scrollbarstring / number
max-heightmax height of scrollbarstring / number
nativewhether to use the native scrollbar stylebooleanfalse
wrap-stylestyle of wrap containerstring / object
wrap-classclass of wrap containerstring
view-stylestyle of viewstring / object
view-classclass of viewstring
noresizedo not respond to container size changes, if the container size does not change, it is better to set it to optimize performancebooleanfalse
tagelement tag of the viewstringdiv
alwaysalways show scrollbarbooleanfalse
min-sizeminimum size of scrollbarnumber20

Events

NameDescriptionType
scrolltriggers when scrolling, return distance of scrollingFunction

Slots

NameDescription
defaultcustomize default content

Exposes

NameDescriptionType
handleScrollhandle scroll eventFunction
scrollToscrolls to a particular set of coordinatesFunction
setScrollTopSet distance to scroll topFunction
setScrollLeftSet distance to scroll leftFunction
updateupdate scrollbar state manuallyFunction
wrapRefscrollbar wrap refObject

Source

ComponentDocs

Contributors