Intensity42
Installation
npx shadcn@latest add @iconiq/r-sliderReducedMotion
Pass reducedMotionwhen you want the installed component to settle into its quieter motion path immediately. Leaving the prop unset still respects the user's system-level reduced motion preference.
Intensity42
Props
Slider
14 props
Single-value slider with the same Iconiq label row, spring-settled fill, and thumb motion layered over Radix UI primitives.
value
numberControlled value. When provided, the parent owns the current position.
defaultValue
numberDefault
50Initial internal value used when value is not supplied.
min
numberDefault
0Lower bound used for clamping and display mapping.
max
numberDefault
100Upper bound used for clamping and display mapping.
step
numberDefault
1Step size applied after translating pointer position into a raw numeric value.
onChange
(value: number) => voidCalled for live value updates from pointer or keyboard input when the snapped value actually changes.
onValueCommit
(value: number) => voidCalled when an interaction is committed, such as releasing a drag or finishing a keyboard step.
showValue
booleanDefault
trueControls whether the live numeric readout is shown on the right side of the label row.
valueDecimals
numberDefault
0Controls how many decimal places are shown in the readout when you want precision without custom formatting.
formatValue
(value: number) => stringOptional formatter for the visible readout and aria-valuetext, useful for units such as dB, percent, or milliseconds.
label
stringOptional label shown on the left side of the header row above the track.
ariaLabel
stringAccessible name used when no visible label is rendered for the slider.
ariaLabelledBy
stringID of an external label element that should be announced instead of the built-in label.
marks
{ value: number; label?: string }[]Optional tick marks rendered below the track so large ranges can include landmarks like Low, Medium, and High.
Notes
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.
ReducedMotion
1 prop
Shared motion override for the motion-enabled exports documented on this page.
reducedMotion
booleanWhen true, the component uses its calmer motion path immediately. Leaving it unset still respects the user's system-level reduced motion preference.
Notes
This prop can force reduced motion on, but it does not opt out of OS-level accessibility preferences when the system is already requesting less motion.