<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
| Prop | Type | Default | Description |
|---|---|---|---|
width | number | 240 | Width in dmm. Ignored with block. |
ui | Record<string, unknown> | {} | Escape hatch: raw uikit (@pmndrs/uikit) properties, merged last. |
disabled | boolean | Greys it out; it does not react to any input. | |
block | boolean | Stretch to the parent's width. | |
parts | Partial<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. | |
min | number | 0 | Value at the left end. |
max | number | 100 | Value at the right end. |
step | number | 1 | Values snap to multiples of it from min. |
modelValue | number | 0 | The value (v-model), between min and max. |
Events
| Event | Payload | Description |
|---|---|---|
change | value: number | The value when the drag ends (released). |
update:modelValue | value: number | The value while dragging (v-model). |