Slider
glasswave/sliderFreeComponent
An input where the user selects a value from within a given range.
Live preview
live · rendered by the registry
Rendered by glasswave on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glasswave.denizisik.com/r/slider.jsonSource
1"use client";23import * as SliderPrimitive from "@radix-ui/react-slider";4import * as React from "react";56import { cn } from "@/lib/utils";7import { focusRing } from "@/lib/glass";89const Slider = React.forwardRef<10 React.ElementRef<typeof SliderPrimitive.Root>,11 React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>12>(({ className, ...props }, ref) => (13 <SliderPrimitive.Root14 ref={ref}15 className={cn(16 "relative flex w-full touch-none select-none items-center",17 className,18 )}19 {...props}20 >21 <SliderPrimitive.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-gray-300 dark:bg-white/20">22 <SliderPrimitive.Range className="absolute h-full bg-blue-500" />23 </SliderPrimitive.Track>24 <SliderPrimitive.Thumb25 className={cn(26 "block h-4 w-4 rounded-full border border-gray-400 dark:border-white/50 bg-white dark:bg-white shadow transition-colors hover:bg-gray-100 dark:hover:bg-white/90 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",27 focusRing,28 )}29 />30 </SliderPrimitive.Root>31));32Slider.displayName = SliderPrimitive.Root.displayName;3334export { Slider };
What it pulls in
npm packages
Other registry items
Files it writes
More from glasswave
All 60 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | glasswave | Components | Free | 2 deps | |
| Alertalert | glasswave | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | glasswave | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | glasswave | Components | Free | 1 dep | |
| Avataravatar | glasswave | Components | Free | 1 dep | |
| Badgebadge | glasswave | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | glasswave | Components | Free | 2 deps | |
| Buttonbutton | glasswave | Components | Free | 2 deps |
