Skip to main content

RangeSlider

Two thumbs bounding a range. Both are real focusable sliders and they swap rather than block.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When to use​

Two thumbs bounding a range.

Accessibility​

Fully keyboard operable: Tab to focus, Enter/Space to activate. The visible focus ring uses --focus-ring — never remove it. Provide an accessible label (aria-label) for icon-only controls.

Install and import​

npx shadcn@latest add @prism/range-slider
import { RangeSlider } from '@/components/prism/RangeSlider';

In a no-build prototype, read it from the bundle instead: const { RangeSlider } = window.PrismDesignSystem_39d121;

Props​

PropTypeRequiredDescription
labelReact.ReactNode—
value[number, number]—[low, high] — always returned sorted, because the thumbs may cross.
minnumber—
maxnumber—
stepnumber—
formatValue(v: number) => React.ReactNode—
onChange(value: [number, number]) => void—
isDisabledboolean—
classNamestring—