Slider
A native range input. Keyboard, touch and form behaviour come free; the filled track is painted from the value.
Examples
Basic
Show code
<Slider label="Volume" min={0} max={100} bind:value={volume} />Steps and disabled
Show code
<Slider label="Budget" min={100} max={1000} step={50} bind:value={budget} />
<Slider label="Disabled" value={40} disabled />Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label above the track. |
value | number | 0 | Current value. Bind it with bind:value. |
min, max, step, name and
every other native range attribute are forwarded. Use bind:value to read the number back.