This component no longer exists. It was in gmhlab’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
gmhlab/sliderRemovedComponent
gmhlab publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/gmhlab/monorepo/main/packages/ui/public/r/slider.jsonSource
1import * as React from "react"2import { Slider as SliderPrimitive } from "radix-ui"34import { cn } from "@/lib/utils"56function Slider({7 className,8 defaultValue,9 value,10 min = 0,11 max = 100,12 ...props13}: React.ComponentProps<typeof SliderPrimitive.Root>) {14 const _values = React.useMemo(15 () =>16 Array.isArray(value)17 ? value18 : Array.isArray(defaultValue)19 ? defaultValue20 : [min, max],21 [value, defaultValue, min, max]22 )2324 return (25 <SliderPrimitive.Root26 data-slot="slider"27 defaultValue={defaultValue}28 value={value}29 min={min}30 max={max}31 className={cn(32 "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",33 className34 )}35 {...props}36 >37 <SliderPrimitive.Track38 data-slot="slider-track"39 className={cn(40 "bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"41 )}42 >43 <SliderPrimitive.Range44 data-slot="slider-range"45 className={cn(46 "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"47 )}48 />49 </SliderPrimitive.Track>50 {Array.from({ length: _values.length }, (_, index) => (51 <SliderPrimitive.Thumb52 data-slot="slider-thumb"53 key={index}54 className="border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"55 />56 ))}57 </SliderPrimitive.Root>58 )59}6061export { Slider }
What it pulls in
npm packages
