Slider
Add .re-slider to a native <input type="range">. Keyboard interaction,
form participation, and role="slider" semantics stay native — the class only
restyles the track and thumb. See Accessibility below.
<label class="re-field">
<span class="re-field__label">Volume</span>
<input type="range" class="re-slider" min="0" max="100" value="50" />
</label> Set data-size="sm" or data-size="lg"; the default is medium. Track and
thumb scale together via the --re-slider-track-size and
--re-slider-thumb-size custom properties, which you can also override
directly.
<label class="re-field">
<span class="re-field__label">Small</span>
<input type="range" class="re-slider" data-size="sm" min="0" max="100" value="25" />
</label>
<label class="re-field">
<span class="re-field__label">Medium (default)</span>
<input type="range" class="re-slider" min="0" max="100" value="50" />
</label>
<label class="re-field">
<span class="re-field__label">Large</span>
<input type="range" class="re-slider" data-size="lg" min="0" max="100" value="75" />
</label> States
Section titled “States”<label class="re-field">
<span class="re-field__label">Disabled</span>
<input type="range" class="re-slider" min="0" max="100" value="40" disabled />
</label> Accessibility
Section titled “Accessibility”- Keyboard — All native, since
.re-slideronly restyles the element. Tab moves focus to the thumb; Arrow keys (and Home/End for min/max, Page Up/Down for larger jumps) adjust the value.step,min, andmaxgovern the increments. - Focus —
:focus-visibledraws the--re-shadow-focusring on the thumb (the input’s ownoutlineis removed so the ring tracks the thumb). The thumb also darkens on:hover. - Semantics —
<input type="range">carries an implicitrole="slider", so assistive tech announces the current, minimum, and maximum values fromvalue/min/maxnatively. Wrap the input in a<label>(the examples use.re-fieldwith a.re-field__label) so the control has an accessible name. - Notes — Disabled is the native
disabledattribute (the thumb dims and the cursor becomesnot-allowed); noaria-disabledis needed. There is no built-in value readout — pair the slider with a visible output if users need to see the exact number.
Related
Section titled “Related”- Field — label and layout wrapper used above
- Accessibility guide