AppSlider
A value, or a range, on a track (APG Slider and Multi-Thumb Slider). Each thumb is a styled native <input type="range">, so arrows, Page Up / Down, Home / End, touch and the screen reader role come from the browser. Pass [low, high] for a range: the two thumbs stop at each other instead of crossing. format names the value both on screen and in aria-valuetext.
Install: pnpm add-component AppSlider
Basic usage
Drag the thumb, or focus it and use the arrow keys. Emits update:modelValue while it moves and change when it is let go.
Range
Two thumbs, each with its own name. Neither can pass the other.
Disabled
API
modelValue(number | [number, number]): The value, or [low, high] for two thumbs (use v-model).min(number): Start of the track.max(number): End of the track.step(number): Granularity of the arrows and the drag.label(string): Visible name. For a range it names the group; without one, pass aria-label.format((value: number) => string): Turns a number into words ("$40", "40%"), for the value beside the label and for aria-valuetext.showValue(boolean): Show the current value beside the label.minLabel(string): Name of the low thumb of a range.maxLabel(string): Name of the high thumb of a range.disabled(boolean): Disables the slider and dims it.