Animated Range Slider

An animated slider component for React that combines shadcn/ui slider with Number Flow for smooth transitions, formatted values, and interactive numeric controls.

Width

Dual Range

Position

Static

70

Installation

npx uilayouts@latest add slider

Props

PropTypeDefaultDescription
labelReact.ReactNode or (value?: number) => ReactNodeundefinedThe content for the label, either as a node or a function receiving the current value.
labelPosition'top' | 'bottom' | 'static''top'The position of the label relative to the slider thumb.
lableContenPos'left' | 'right''right'The position of the label content within the label block.
classNamestringundefinedAdditional class name(s) for the outer container of the slider.
valuenumber[]undefinedThe current value(s) of the slider. Can be a single value or a range (array).
minnumberundefinedThe minimum value allowed for the slider.
maxnumberundefinedThe maximum value allowed for the slider.
stepnumberundefinedThe step increment for the slider values.
refReact.RefObjectundefinedA React ref object for the slider's root element.

Inspire from shadcn/ui expansions