Scroll

2 min read

Scrollbar

The scroll bar is used to control the visible area of the scroll area.

Usage

import { Scrollbar } from '@antv/gui';

Options

属性描述类型默认值
orientationThe orientation of scrollbarhorizontal | vertical vertical
widthWidthnumber[]
heightHeightnumber[]
valuenumber ∈ [0, 1]0
minThe lower limit of values of the scrollable range.number ∈ [0, 1)1
maxThe upper limit of values of the scrollable range.number ∈ (min, 1]0
trackStyleThe style of scrollbar track{default: RectProps, active: RectProps}[]
isRoundWhether the scrollbar thumb has round edgebooleantrue
thumbLenThe length of scrollbar thumbboolean[]
thumbStyleThe style of scrollbar thumb{default: RectProps, active: RectProps}[]

Events

事件触发条件参数
scrollOccurs when the scroll box has been moved by either a mouse or keyboard actionvalue: number
valuechangeOccurs when the Value property is changed, either by a Scroll event or programmatically{oldValue: number, value: number}