Components
BaseRangeSlider
A slider with two thumbs for a minimum and a maximum, with number fields for exact values.
components/ui/inputs/BaseRangeSlider.vue
View in the demo
Example
The range filters of BaseDataTable are this component.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
minrequired | number | — | The lowest value. |
maxrequired | number | — | The highest value. |
step | number | 1 | The increment. |
prefix | string | — | Shown before the values, such as $. |
suffix | string | — | Shown after the values, such as kg. |
min-aria-label | string | — | Accessible name of the minimum. |
max-aria-label | string | — | Accessible name of the maximum. |
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 | BaseRangeValue | null | null | [min, max], or null for no limit. |
Events
Name | Payload | Description |
|---|---|---|
@update:modelValue | [value: BaseRangeValue | null] | — |
Accessibility
With a label the group renders a fieldset with a legend, so screen readers announce the question before each option. It accepts rules, hint and error-messages like any field.