Slider
stableAn input where the user selects a value from within a given range.
Basic usage
Examples
Range slider
Pass two default values to create a range slider with two thumbs.
20 – 80
Range and vertical sliders
Slider supports multiple thumbs, step intervals and orientation changes.
Semantic colors
Color prop tints the slider track and thumb to match semantic intent.
Features
- Can be controlled or uncontrolled.
- Supports multiple thumbs.
- Supports keyboard and touch.
- Supports a stepped interval and min/max.
Installation
bash
pnpm dlx structyl add sliderAPI Reference
Slider API reference
Full props, types, defaults, and all 5 parts.
Keyboard interactions
Adheres to the WAI-ARIA design pattern .
| Key | Description |
|---|---|
| ArrowRight / ArrowUp | Increases the value by the step amount. |
| ArrowLeft / ArrowDown | Decreases the value by the step amount. |
| Home / End | Sets the value to its minimum / maximum. |
| PageUp / PageDown | Increases / decreases by a larger step. |