@usevyre/react@usevyre/vue

Slider

A range input with a custom visual track, fill, and thumb. Supports controlled / uncontrolled state, two sizes, and full keyboard accessibility via the native <input type="range">.


Controlled & sizes

Value: 40
import { Slider } from "@usevyre/react";

// Uncontrolled
<Slider defaultValue={40} />

// Controlled
const [vol, setVol] = useState(40);
<Slider value={vol} onValueChange={setVol} />

Props

Props

PropTypeDefaultDescription
valuenumberControlled current value.
defaultValuenumber0Initial value (uncontrolled).
minnumber0Minimum value.
maxnumber100Maximum value.
stepnumber1Step increment.
disabledbooleanfalseDisables interaction.
size"sm" | "md""md"Track and thumb size.
onValueChange(v: number) => voidReact only. Called when the value changes.
classstringAdditional CSS class.