Installation
npx shadcn@latest add @iconiq/r-sliderProps
Slider
Single-value slider with the same Iconiq label row, spring-settled fill, and thumb motion layered over Radix UI primitives.
valuenumberdefaultValuenumberDefault 50
minnumberDefault 0
maxnumberDefault 100
stepnumberDefault 1
onChange(value: number) => voidonValueCommit(value: number) => voidshowValuebooleanDefault true
valueDecimalsnumberDefault 0
formatValue(value: number) => stringlabelstringariaLabelstringariaLabelledBystringmarks{ value: number; label?: string }[]When value is undefined, the component stores the current value internally and updates it during drag operations.
The displayed value is derived from the animated motion value, so the readout stays in sync with the spring animation rather than jumping immediately.
Touch interaction keeps vertical page scrolling available with pan-y while still supporting horizontal dragging on the slider itself.
Interaction model
Slider supports pointer, keyboard, and screen-reader friendly range semantics.
Built on Radix Slider.Root, Slider.Track, Slider.Range, and Slider.Thumb while preserving the same active track-height animation, spring-smoothed fill, and thumb scale behavior as the core slider.
The thumb and filled track animate with springs whenever the current value changes.
Pointer capture is taken on pointer down and released on pointer up or cancel, which keeps dragging stable even when the pointer leaves the track.
Keyboard support includes Arrow keys for step changes, Page Up and Page Down for larger jumps, and Home and End for min and max.
Registry bundle
Install the exact registry entry shown on the right when you want the component file and its declared runtime dependencies together.
Dependencies: @radix-ui/react-slider, motion.
Installs a Radix slider with the same value, defaultValue, min, max, step, marks, and formatting API as the Base UI version.
Uses the Radix slider track, range, and thumb primitives under the same Iconiq track and thumb motion shell.
The generated registry file is /r/r-slider.json.