Slider

Allows users to pick a value between a minimum and maximum using a sliding handle.

@radix-ui/react-slider

lucide-react

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes.com/r/slider.json

Examples


Orientation

Value Slider

Range Slider

Icon Slider


API Reference

Slider

PropTypeDefault
minnumber0
maxnumber100
stepnumber1
valuenumber[]-
defaultValuenumber[][min, max]
onValueChange(value: number[]) => void-
orientationhorizontal,verticalhorizontal
disabledbooleanfalse
classNamestring-