Hextech UI

Slider

Live example

Slider

Intensity
40
Preferred range
25 – 75

Installation

Terminal
npx shadcn@latest add https://hextech-ui.vercel.app/r/slider.json

API reference

These are the main Slider options. See the exported TypeScript types for inherited native or primitive props.

PropTypeDefault
labelstring (required)—
value / defaultValuenumber | number[]0
thumbLabelsstring[]Generated from label
min / max / stepnumber0 / 100 / 1

Values and labels

Use value and onValueChange for controlled values, or defaultValue for local state. Supply thumbLabels for a multi-thumb range so each handle has a distinct name. Keep the minimum, maximum and step consistent with the displayed units.