This component no longer exists. It was in ondo-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-09 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
slider
ondo-ui/sliderRemovedComponent
An input where the user selects a value from within a given range.
Install it
npx shadcn@latest add https://ui.ondo.dou.so/r/slider.jsonSource
1import { Slider as SliderPrimitive } from "@base-ui/react/slider"23import { cn } from "@/lib/utils"45function Slider({6 className,7 defaultValue,8 value,9 min = 0,10 max = 100,11 ...props12}: SliderPrimitive.Root.Props) {13 const _values = Array.isArray(value)14 ? value15 : Array.isArray(defaultValue)16 ? defaultValue17 : [min, max]1819 return (20 <SliderPrimitive.Root21 className={cn("data-horizontal:w-full data-vertical:h-full", className)}22 data-slot="slider"23 defaultValue={defaultValue}24 value={value}25 min={min}26 max={max}27 thumbAlignment="edge"28 {...props}29 >30 <SliderPrimitive.Control className="relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col">31 <SliderPrimitive.Track32 data-slot="slider-track"33 className="relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1.5 data-horizontal:w-full data-vertical:h-full data-vertical:w-1.5"34 >35 <SliderPrimitive.Indicator36 data-slot="slider-range"37 className="bg-primary select-none data-horizontal:h-full data-vertical:w-full"38 />39 </SliderPrimitive.Track>40 {Array.from({ length: _values.length }, (_, index) => (41 <SliderPrimitive.Thumb42 data-slot="slider-thumb"43 key={index}44 className="block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] select-none hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"45 />46 ))}47 </SliderPrimitive.Control>48 </SliderPrimitive.Root>49 )50}5152export { Slider }
What it pulls in
npm packages
Other registry items
