| name | Basic |
|---|---|
| route | /api/basic |
| menu | API |
Want to skip to the implementation? Check out these examples:
The API below described how to use the basic features.
values: ReadonlyArray<number>Required The current value (or values) for the range.
min: numberRequired The minimum limit for the range.
max: numberRequired The maximum limit for the range.
stepSize: numberRequired The distance between selectable steps.
onChange: (instance: Ranger<TTrackElement>) => voidA function that is called when the handle is released.
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: null | numberThe zero-based index of the handle that is currently being dragged, or null if no handle is being dragged.