Slider
A single-thumb control for picking a number within a range.
Show codeHide code
Installation
import { Slider } from "@makeplane/propel/components/slider";Usage
import { Slider } from "@makeplane/propel/components/slider";
import * as React from "react";
export default function BasicDemo() {
const [value, setValue] = React.useState(40);
return (
<Slider
label="Volume"
size="md"
value={value}
onValueChange={(next) => setValue(next as number)}
min={0}
max={100}
step={1}
/>
);
}Examples
Sizes
The size axis sets the thumb and hit-area size; the track bar height stays the same.
Show codeHide code
Formatted value
Pass format (an Intl.NumberFormatOptions) to control the readout — here a percentage.
Show codeHide code
Edge-aligned thumb
With thumbAlignment="edge" the thumb stays fully inside the track at the extremes instead of overhanging it.
Show codeHide code
In a form
Wrap the slider in a Field with a name and its value serializes with the surrounding Form.
Show codeHide code
API Reference
Slider
The ready-made slider: a single-thumb control for picking a number within a range. Drive it with
value/defaultValue + onValueChange, and bound it with min/max/step. Pass label
(visible) or aria-label to name the thumb, and format (an Intl.NumberFormatOptions) to
format the readout.
size sets the thumb and hit-area size (sm / md / lg). The track bar height and shape are
always the same per the design spec.
Grafts Base UI Slider behavior onto the elements/slider styled parts (Slider root +
SliderLabel + SliderValue + SliderControl + SliderTrack + SliderIndicator +
SliderThumb). For multiple thumbs or fully custom layout, graft the elements/slider parts
directly.