Slider · range
One handle or two — press the track and the nearest one glides there, a bubble shows the value, marks and labels snap, and the keyboard steps it.
One value · a range · drag, press the track, or use the keys
Volume60%
Budget€25 – €70
Marks with labels · steps · decimals
Price range$200 – $800
Rating★★★☆☆
Temperature21.5 °C
At least 10 apart30 – 60
Usage
import { signal } from "./index.js";import { Slider } from "./components/slider.js"; Slider({ value: signal(60), format: (v) => v + "%" }) // one handleSlider({ value: signal([25, 70]), min: 0, max: 100, step: 1 }) // a [lo, hi] signal: two // marks (with labels to click), ticks per step, decimals, a bubble that staysSlider({ value: price, min: 0, max: 1000, step: 50, marks: [{ value: 0, label: "$0" }, …] })Slider({ value: rating, min: 1, max: 5, marks: true })Slider({ value: temp, min: 16, max: 28, step: 0.5, tooltip: "always" })Slider({ value: range, minDistance: 10, size: "sm", tone: "success", onChange: (v) => {}, onCommit: (v) => save(v) }) // commit: when let go// ← → one step (Shift: ten) · PageUp / PageDown · Home / End