A range input for selecting a numeric value within a defined range. — <cs-slider>
<cs-slider value="50"></cs-slider>
<cs-slider min="0" max="100" step="10" value="30"></cs-slider>
aria-descriptionstring
default: nullAdds an aria-description for slider labels.
Use when sliders have formatted reference values.
aria-labelstring
default: nullAdds an aria-label to the native control.
Use this if you don't have a visible label for this control.
disabledboolean
default: falseWhether or not the slider is disabled.
hide-fill-linebooleanHides the colored fill line, so only the handle is visible.
i18n-stringsSliderProps.I18nStringsAn object containing all the necessary localized strings required by the component.
maxnumberrequiredIndicates the maximum value.
minnumberrequiredIndicates the minimum value.
read-onlybooleanSpecifies if the control is read-only, which prevents the user from modifying the value, but does not prevent the value from being included in a form submission. A read-only control is still focusable.
reference-valuesReadonlyArray<number>Labels shown between the minimum and maximum values.
stepnumber
default: 1How big the step size is.
tick-marksbooleanShow the tick marks along the slider line. Use with stepped sliders, except in extreme cases.
valuenumber
default: 0Indicates the current value.
value-formatter(value: number) => stringFormats the values. This will format both the labels and the tooltip.
changeCustomEvent<SliderProps.ChangeDetail>Called when the user selects a value.
The event detail contains the current value.