本页还没有译文
本页 22 段还没译成Português (BR),下面显示的是英文原文。framework/react/api/basic
还没翻译译自英文(tanstack.com)本页 22 段都还没译
Examples
Want to skip to the implementation? Check out these examples:
The API below described how to use the basic features.
Options
values
values: ReadonlyArray<number>Required The current value (or values) for the range.
min
min: numberRequired The minimum limit for the range.
max
max: numberRequired The maximum limit for the range.
stepSize
stepSize: numberRequired The distance between selectable steps.
onChange
onChange: (instance: Ranger<TTrackElement>) => voidA function that is called when the handle is released.
API
handles
handles: ReadonlyArray<{
value: number
isActive: boolean
onKeyDownHandler(event): function
onMouseDownHandler(event): function
onTouchStart(event): function
}>Handles to be rendered. Each handle has the following props:
value: number- The current value for the handle.isActive: boolean- Denotes if the handle is currently being dragged.onKeyDownHandler(event): funconMouseDownHandler(event): funconTouchStart(event): func
activeHandleIndex
activeHandleIndex: null | numberThe zero-based index of the handle that is currently being dragged, or null if no handle is being dragged.
AI 翻译查看英文原文