Skip to content

Forms

Slider

A range slider on a native input[type=range].

stableNo JS requiredBuilt on <input type="range">hydrateless/slider.css

A range slider styled with the hl-slider primitive. It is a native <input type="range">, so keyboard support, step increments, and form values all come built in. No JavaScript.

Playground

Live

Props

The framework bindings expose these props (and forward the rest to the root element).

PropTypeDefaultDescription
minnumber0Minimum value.
maxnumber100Maximum value.
valuenumberControlled value; pair with `onValueChange`.

CSS variables

Override these on any ancestor to theme the component. See the theme studio to preview changes live.

CSS variableUsed for
--hl-primaryFilled track and thumb color.
--hl-borderEmpty track color.

Accessibility

  • A native range input exposes value, min, max, and step to assistive tech.
  • Arrow keys, Home, End, and Page Up/Down all adjust the value natively.

Released under the MIT License.