Slider

Range slider built on Radix UI Slider. Allows users to select a numeric value within a defined range with configurable min, max, and step.

Basic

Preview

Custom Step

Preview

Props

PropTypeDefaultDescription
labelstring-Label text displayed above the slider.
defaultValuenumber[]-Default slider value for uncontrolled usage.
valuenumber[]-Controlled slider value.
onValueChange(value: number[]) => void-Callback fired when the slider value changes.
minnumber0Minimum value of the slider range.
maxnumber100Maximum value of the slider range.
stepnumber1Step increment between values.
disabledbooleanfalseWhether the slider is disabled.
classNamestring-Additional CSS classes.

Accessibility

  • Built on Radix UI Slider which provides full WAI-ARIA slider role compliance
  • Label is associated with the slider for screen reader support
  • Navigable via arrow keys with step-based increments
  • Current value, min, and max are conveyed to assistive technology via aria-valuenow, aria-valuemin, and aria-valuemax
  • Home and End keys jump to minimum and maximum values respectively