Slider preview
Adjust a value with a pointer, touch or keyboard.
free · Forms · primitive
When to use
- Use it when a product interface needs adjust a value with a pointer, touch or keyboard.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose form-field instead when a labeled email field with validation and help text is the actual interface need, rather than slider.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add https://tidalui.com/r/slider.jsonImport components/ui/tidal.css, components/ui/slider.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/slider.css";
import{TidalSlider}from"./components/ui/slider";
export default()=><div className="tidal-scope"><TidalSlider label={"Demo"} onValueChange={() => {}} value={[1]}/></div>;API and props
TidalSliderDigits.text (required)stringRequired text value accepted by this exported component.
TidalSlider.label (required)stringRequired label value accepted by this exported component.
TidalSlider.onValueChange (required)(value: TidalSliderValue) => voidCallback invoked when the value change interaction is proposed.
TidalSlider.value (required)TidalSliderValueRequired value value accepted by this exported component.
TidalSlider.descriptionstring | undefinedOptional description value accepted by this exported component.
TidalSlider.errorstring | undefinedOptional error value accepted by this exported component.
TidalSlider.formatValue((value: number) => string) | undefinedOptional format value value accepted by this exported component.
TidalSlider.marksArray<{ value: number; label?: string; }> | undefinedOptional marks value accepted by this exported component.
TidalSlider.onValueCommit((value: TidalSliderValue) => void) | undefinedCallback invoked when the value commit interaction is proposed.
TidalSlider.readOnlyboolean | undefinedOptional read only value accepted by this exported component.
TidalSlider.rootClassNamestring | undefinedOptional root class name value accepted by this exported component.
TidalSlider.showValueboolean | undefinedOptional show value value accepted by this exported component.
TidalSlider.thumbLabels[string] | [string, string] | undefinedOptional thumb labels value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Keep field state, validation results, submission, and persistence in the host form workflow.