structyl

Slider

stable

An 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 slider

API Reference

Slider API reference

Full props, types, defaults, and all 5 parts.

View API

Keyboard interactions

Adheres to the WAI-ARIA design pattern .

KeyDescription
ArrowRight / ArrowUpIncreases the value by the step amount.
ArrowLeft / ArrowDownDecreases the value by the step amount.
Home / EndSets the value to its minimum / maximum.
PageUp / PageDownIncreases / decreases by a larger step.
Slider | structyl