Logo Docs

Range Slider

Range Slider

Single-thumb range control built on the native input[type=range] with KtUI lifecycle, optional value output, and a CSS variable for track fill.

Basic

Initialize on a wrapper that contains one input[type="range"]. The component stores --mv-range-fill on the root (0–1) so you can drive a visual track or theme styles.

With output

Point data-mv-range-slider-output at a selector for an element whose text updates on input and change (searched under the root first, then document).

Level25

Disabled

Use the native disabled attribute on the range input. The control stays a real form field; avoid replacing it with a non-focusable custom thumb.

Native disabled — no pointer events; keyboard focus depends on the browser.

Stepped bounds

Define explicit min, max, and step values to constrain user input to predictable increments.

Value35

Uses native bounds with min=10, max=90, and step=5.

Datalist ticks

Use native list and to add browser-supported tick references for common values.

Value50
0255075100

Native tick marks via list + <datalist>.

Form integration

Keep the range input in a standard form so submission and readout work with native semantics.

70

Submit to read native form data.

Programmatic update

Use external controls to set preset values while keeping slider output in sync.

Progress50