Skip to content
Browse docs and components

Slider

slider

A 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.

Responsive

Install

$npxshadcnadd@forme/slider

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.

PropTypeDefaultDescription
labelReactNode—Visible label, wired to every thumb.
showValuebooleantrueShows the formatted value beside the label. On by default when there is a label.
thumbLabelsreadonly string[]—Names each thumb of a range for a screen reader: ["Minimum price", "Maximum price"].

Also takes every prop of Base UI Slider.Root.