v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

RangeSlider

A bounded interval using two native sliders.

Interactive preview

Budget range

Usage

import { RangeSlider } from "@devvy-ui/react";

<RangeSlider label="Budget" name="budget" min={0} max={100} defaultValue={[20, 80]} />

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
value / defaultValuereadonly [number, number][0, 100]Interval endpoints.
onValueChange(range) => void—Change callback.
min / max / stepnumber0 / 100 / 1Native range constraints.

Accessibility & behavior

Platform Behavior & Guidelines

Both endpoints have separate names and native range keyboard/touch behavior. Endpoints cannot cross. Names submit as budget-min and budget-max.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add range-slider

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

RangeSlider.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.