Slider

A built slider, as opposed to range, which styles the native input. Kobalte's Slider positions the fill and the thumb with inline styles; these classes paint them.

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
sliderThe root: column layout, and greys out when disabled
slider-trackThe rail
slider-fillThe filled part of the rail
slider-thumbThe handle
slider-labelA label above the track
slider-valueThe current value, next to the label

Basic

<div class="slider" style="width: 16rem">
  <div class="flex" style="justify-content: space-between; gap: 0.5rem">
    <span class="slider-label">Volume</span>
    <span class="slider-value">60</span>
  </div>
  <div class="slider-track">
    <div class="slider-fill" style="left: 0%; right: 40%"></div>
    <span class="slider-thumb" style="position: absolute; left: 60%; transform: translateX(-50%)"></span>
  </div>
</div>

Slider.Thumb is role="slider" and needs no class. The root, track and fill have none, so they take theirs by hand.