Skip to content

VRangeSlider

Base class for range-slider

Props

NameTypeDescription
aria-end-labelstringAria label for the end thumb
aria-start-labelstringAria label for the start thumb
connotationEnum:
accent
cta
The connotation of the component
disabledbooleanSets the element's disabled state. A disabled element will not be included during form submission.
endstringThe current end value of the element. This property serves as a mechanism to set the end property through both property assignment and the .setAttribute() method. This is useful for setting the field's value in UI libraries that bind data through the .setAttribute() API and don't support IDL attribute binding.
end-as-numbernumberThe end property, typed as a number.
initial-endstringThe initial end value. This value sets the end property only when the end property has not been explicitly set.
initial-startstringThe initial start value. This value sets the start property only when the start property has not been explicitly set.
initial-valuestringThe default value of the element. This value sets the value property only when the value property has not been explicitly set.
labelstringThe label for the form element.
markersbooleanDisplay markers on/off
maxnumberThe maximum value of the range.
minnumberThe minimum value of the range.
namestringThe name of the element. This element's value will be surfaced during form submission under the provided name.
orientationEnum:
horizontal
vertical
The orientation of the slider.
pinbooleanShow current values on the thumbs.
requiredbooleanRequire the field to be completed prior to form submission.
startstringThe current start value of the element. This property serves as a mechanism to set the start property through both property assignment and the .setAttribute() method. This is useful for setting the field's value in UI libraries that bind data through the .setAttribute() API and don't support IDL attribute binding.
start-as-numbernumberThe start property, typed as a number.
stepnumberValue to increment or decrement via arrow keys, mouse click or drag.
valuestringThe current value of the element.
value-text-formatter((value: string) => string)Custom function that generates a string for the component's "aria-valuetext" attribute based on the current value.

Events

NameEvent TypeDescription
changeCustomEvent<undefined>Event emitted when either the start or end value changes.
inputCustomEvent<undefined>Event emitted when either the start or end value changes.
input:endCustomEvent<undefined>Event emitted when the end value changes
input:startCustomEvent<undefined>Event emitted when the start value changes

Methods

NameTypeDescription
checkValidity() => booleanReturn the current validity of the element.
formResetCallback() => void
reportValidity() => booleanReturn the current validity of the element. If false, fires an invalid event at the element.