Slider
sliderA single or range slider on the Base UI primitive, with a label, a formatted value that matches what a screen reader announces, and a thumb that grows when picked up.
import { Slider } from "@/components/forme/slider/slider";
export function SliderDemo() {
return (
<div className="flex w-full max-w-sm flex-col gap-8">
<Slider label="Volume" defaultValue={64} format={{ style: "unit", unit: "percent" }} />
<Slider
label="Price"
defaultValue={[120, 480]}
min={0}
max={1000}
step={10}
minStepsBetweenValues={5}
format={{ style: "currency", currency: "USD", maximumFractionDigits: 0 }}
thumbLabels={["Minimum price", "Maximum price"]}
/>
<Slider label="Disabled" defaultValue={30} disabled />
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
Slider
A slider, single or range: pass an array as the value for two thumbs.
| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | — | Visible label, wired to every thumb. |
showValue | boolean | true | Shows the formatted value beside the label. On by default when there is a label. |
thumbLabels | readonly string[] | — | Names each thumb of a range for a screen reader: ["Minimum price", "Maximum price"]. |
Also takes every prop of Base UI Slider.Root.
Related


Checkbox
A single choice with a visible label wired to it for a screen reader. Carries a destructive variant for choices that cannot be undone, and the box itself fills with the accent when checked so the state is readable at a glance.
forms

Poll
A question to vote on that turns into its results in place: bars grow to each share, the percentages roll and always total 100, and your choice is marked. Single or multiple choice, on real radios and checkboxes.
forms

Radio group
A choice of exactly one option, where the group owns the value and the arrow keys travel in the direction the options are laid out. Horizontal and vertical are the same component with an orientation, and a disabled option reads as present but unavailable.
forms