Skip to content

<XrSlider> ​

A number in a range. Drag the handle with a ray, or slide a fingertip along the track.

Usage ​

vue
<XrSlider v-model="volume" :min="0" :max="100" :step="1" />

API ​

Props ​

PropTypeDefaultDescription
widthnumber240Width in dmm. Ignored with block.
uiRecord<string, unknown>{}Escape hatch: raw uikit (@pmndrs/uikit) properties, merged last.
disabledbooleanGreys it out; it does not react to any input.
blockbooleanStretch to the parent's width.
partsPartial<Record<"fill" | "track" | "thumb", Record<string, unknown>>>Raw uikit properties per inner part, merged after the defaults: track, fill (the part up to the value), thumb.
minnumber0Value at the left end.
maxnumber100Value at the right end.
stepnumber1Values snap to multiples of it from min.
modelValuenumber0The value (v-model), between min and max.

Events ​

EventPayloadDescription
changevalue: numberThe value when the drag ends (released).
update:modelValuevalue: numberThe value while dragging (v-model).

MIT License