Forms
Slider
A value or a range. Inside Field one thumb takes the field label; a range is a group with the field label, and its thumbs are named Minimum and Maximum (or thumbLabels).
import { Slider } from "@percentsa/ui";Examples
40 – 120
Code
export function SliderExample() {
const t = useT();
const [range, setRange] = useState([40, 120]);
return (
<Stack gap={8} className="w-full max-w-sm">
<Field label={t("Budget (thousand riyals)", "الميزانية (ألف ريال)")} hint={`${range[0]} – ${range[1]}`}>
<Slider min={10} max={500} step={10} value={range} onValueChange={setRange} />
</Field>
</Stack>
);
}