Components
BaseSlider
A slider for a single value, with the value and the limits displayed.
components/ui/inputs/BaseSlider.vue
View in the demo
Example
8
120
4 kg
API
It also accepts every prop, slot and event of v-slider, which it passes through.
Props
Name | Type | Default | Description |
|---|---|---|---|
minrequired | number | — | The lowest value. |
maxrequired | number | — | The highest value. |
step | number | 1 | The increment. |
show-value | boolean | false | Shows the current value next to the label. |
value-text | string | — | A formatted value to show instead, such as 8 kg. |
show-limits | boolean | false | Shows min and max under the track. |
label | string | — | The visible label above the field, linked to it with for and aria-labelledby. |
input-id | string | — | A fixed id for the input. One is generated with useId() when you leave it out. |
optional | boolean | — | Adds “(optional)” after the label. Never mark required fields. |
info | BaseInputInfo | — | A help popover next to the label: a text or a list of { title, text }. |
v-model | number | 0 | The value. |
Slots
Name | Slot props | Description |
|---|---|---|
#details | — | Replaces the row under the track. |
Events
Name | Payload | Description |
|---|---|---|
@update:modelValue | [value: number] | — |
Accessibility
The thumb works with the arrow keys, Page Up and Page Down. value-text is also read by screen readers.