Slider

A base slider component that provides range input functionality with support for single value and range (dual handle) modes.

Properties

NameTypeDefaultDescription
minNumber0The minimum value of the slider.
maxNumber100The maximum value of the slider.
valueNumber-The current value (for single value mode).
valueStartNumber-The start value (for range mode).
valueEndNumber-The end value (for range mode).
valueLabelString''Label text for the value (single mode).
valueLabelStartString''Label text for the start value (range mode).
valueLabelEndString''Label text for the end value (range mode).
ariaLabelStartString''ARIA label for the start handle.
ariaValueTextStartString''ARIA value text for the start handle.
ariaLabelEndString''ARIA label for the end handle.
ariaValueTextEndString''ARIA value text for the end handle.
stepNumber1The step increment for slider values.
ticksBooleanfalseWhether to display tick marks along the slider track.
labeledBooleanfalseWhether to display value labels on the handles.
rangeBooleanfalseWhether to enable range mode with start and end handles.
nameStartString-Form name for the start value. Uses name-start attribute or falls back to name.
nameEndString-Form name for the end value. Uses name-end attribute or falls back to nameStart.

Methods

NameDescription
focus()Focuses the slider's end input element.
formResetCallback()Called when the form is reset, restores initial values.

Events

NameTypeDescription
inputInputEventDispatched when the slider value changes during user interaction.
changeEventDispatched when the slider value changes and the user completes the interaction.

Form Association

The Slider component is form-associated and can be used within forms. In single value mode, it submits a single value. In range mode, it submits two values using nameStart and nameEnd.