Range

A native range, painted with the same rail, fill and thumb as the slider, so it matches Kobalte's Slider.

alpha The class names and states here are stable. The look is not: these styles can change in a minor release, without a major version bump.

ClassDoes what
rangeA native range with the slider's rail, fill and thumb

Basic

<label class="label">
  Volume
  <input type="range" class="range" min="0" max="100" value="60" style="--range-fill: 60%" />
</label>

Keeping the fill in step

Firefox draws the fill itself. Chrome and Safari have no pseudo-element for it, so the fill reads --range-fill, which has to follow the value:

<input
  type="range"
  class="range"
  value="60"
  style="--range-fill: 60%"
  oninput="this.style.setProperty('--range-fill', this.value + '%')"
/>

That assumes a 0 to 100 range. For any other min and max, set it to (value - min) / (max - min) as a percentage.

Disabled

<input type="range" class="range" value="60" style="--range-fill: 60%" disabled />