Dinachi

Slider

A slider component for selecting values within a range. Supports single value, range selection, and step increments.

View Source

#Installation

npx @dinachi/cli@latest add slider

#Usage

tsx
import { Slider, SliderLabel, SliderControl, SliderTrack, SliderRange, SliderThumb, SliderValue } from '@/components/ui/slider'

#Examples

#API Reference

PropTypeDefaultDescription
valuenumber[]The controlled value of the slider
defaultValuenumber[]The default value when uncontrolled
onValueChange(value: number[]) => voidCallback fired when the slider value changes
minnumber0The minimum allowed value
maxnumber100The maximum allowed value
stepnumber1The step increment between values
disabledbooleanfalseWhether the slider is disabled
orientation'horizontal' | 'vertical''horizontal'The orientation of the slider