Slider

Form

A customizable slider component for selecting numeric values within a range. Supports single and multiple handles, custom steps, and vertical orientation.

Installation

bash
1npx @dinachi/cli@latest add slider

Run the CLI command above to automatically install the component and its dependencies.

Examples

Default Slider

A basic slider for value selection

Slider with Value Display

Controlled slider showing current value

50%

Range Slider

Slider with two thumbs for selecting a range

$25 - $75

Step Slider

Slider with defined step increments

50%
0%25%50%75%100%

Disabled Slider

Slider in disabled state

API Reference

PropTypeDefaultDescription
value
number[]The current value(s) of the slider
defaultValue
number[]The default value(s) of the slider
onValueChange
(value: number[]) => voidCallback fired when the slider values change
min
number0The minimum value of the slider
max
number100The maximum value of the slider
step
number1The step increment for the slider
disabled
booleanfalseWhether the slider is disabled
orientation
'horizontal' | 'vertical''horizontal'The orientation of the slider