Slider

Custom horizontal range. Pointer drag + full keyboard support. ARIA-compliant.

Throttle64%
Thrust Vector30°
Locked50

Add to your project

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/andromeda-slider

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

PropTypeDefaultDescription
valuenumber-Controlled value.
defaultValuenumber-Uncontrolled initial value.
minnumber0Minimum value of the range.
maxnumber100Maximum value of the range.
stepnumber1Increment the value snaps to.
onValueChange(next: number) => void-Handler called with the new value on drag or keyboard change.
labelstring-Optional uppercase mono label.
showValuebooleantrueRender the numeric readout next to the label.
unitstring-Optional unit suffix (e.g. "%", "KM").
disabledbooleanfalseDisables interaction and dims the slider.
classNamestring-Additional classes for the root wrapper.
styleReact.CSSProperties-Inline styles merged onto the root wrapper.
idstring-Id for the slider track; auto-generated when omitted.

More Andromeda components