A mixing-console-style parameter fader where the control IS the display — label and value live inside the track, the fill edge is the reading, and a thin bar rides the edge as the grab signifier. Supports continuous and detent (snappy) value grammars, elastic overdrag, and spring-animated settle.
Dependencies
Interaction Type
Click or drag the track to change the value. Use arrow keys for keyboard control. PageUp/PageDown for large steps.
Props
Options you can pass to customize this component.
label*Accessible name; also used to attribute dev-time warnings.
value*Controlled value for the slider.
onValueChange*Called with the new value whenever it changes.
minMinimum value. Defaults to 0.
maxMaximum value. Defaults to 100.
stepStep increment. Defaults to 1.
unitSpoken after the value via aria-valuetext (e.g. "%").
pointsSnap-points grammar: pointer input only ever lands on these values. Omit for continuous.
sizeSize variant. Defaults to "md".
toneColor tone. Defaults to "accent".
borderedHairline input outline for busy surfaces.
disabledDisables the fader.
classNameExtra classes merged onto the root element.
Installation
How to use
import { Fader } from "@/components/ui/fader"
export function Demo() {
const [value, setValue] = useState(65)
return (
<Fader
label="Volume"
value={value}
onValueChange={setValue}
min={0}
max={100}
unit="%"
size="md"
tone="accent"
/>
)
}Source Code
Click the code icon in the top-right corner to view the source code.
License & Usage
// No code loaded.