Skip to content

VSlider

Props

NameTypeDescription
connotationEnum:
accent
cta
The connotation of the component
disabledbooleanSets the element's disabled state. A disabled element will not be included during form submission.
initial-valuestringThe default value of the element. This value sets the value property only when the value property has not been explicitly set.
markersbooleanDisplay markers on/off
maxnumberThe maximum allowed value.
minnumberThe minimum allowed value.
mode'single-value'The selection mode.
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.
readonlybooleanWhen true, the control will be immutable by user interaction. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly
requiredbooleanRequire the field to be completed prior to form submission.
stepnumberValue to increment or decrement via arrow keys, mouse click or drag.
valuestringThe current value of the element.
value-as-numbernumberThe value property, typed as a number.
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>Fires a custom 'change' event when the slider value changes

Methods

NameTypeDescription
checkValidity() => booleanReturn the current validity of the element.
decrement() => voidDecrement the value by the step
increment() => voidIncrement the value by the step
reportValidity() => booleanReturn the current validity of the element. If false, fires an invalid event at the element.