Components
Slider
A native range input with a glowing thumb and any track you like, at full size or small.
Import
import { Slider } from '@rinzai/zen';Examples
Small
size="sm": a thin track and a small thumb, for a compact control like a player's volume. Still 20px tall to grab.
Hue
A custom track (every hue) and thumb (the chosen colour); onValueCommit fires once, when you let go.
Saved: 295°
API reference
<Slider>
A range slider on the native <input type="range"> (keyboard, forms and screen readers work as usual): a rounded track, filled up to the value in the accent unless you give it your own trackBackground (e.g. a hue gradient), and a glowing thumb.
| Prop | Type | Default |
|---|---|---|
defaultValueThe first value, when the slider keeps its own (default | number | — |
max | number | 100 |
min | number | 0 |
onValueChangeWhile dragging (every step). | ((value: number) => void) | — |
onValueCommitOnce the user lets go: the moment to save. | ((value: number) => void) | — |
size
| "md" | "sm" | md |
step
| "any" | number | 1 |
thumbColorCSS colour for the thumb (default: the accent). | string | — |
trackBackgroundCSS background for the track, e.g. a gradient of hues. | string | — |
valueThe value, when you keep it. | number | — |
valueTextSpoken value, e.g. (v) => | ((value: number) => string) | — |