Glass Slider
einui/glass-sliderFreeComponent
Range input controls with gradient track, glow effects, and smooth thumb interaction.
Live preview
live · rendered by the registry
Rendered by einui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.eindev.ir/r/glass-slider.jsonSource
1"use client"23import * as React from "react"4import * as SliderPrimitive from "@radix-ui/react-slider"5import { cn } from "@/lib/utils"67const GlassSlider = React.forwardRef<8 React.ElementRef<typeof SliderPrimitive.Root>,9 React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>10>(({ className, ...props }, ref) => (11 <SliderPrimitive.Root12 ref={ref}13 className={cn("relative flex w-full touch-none select-none items-center", className)}14 {...props}15 >16 <SliderPrimitive.Track17 className={cn(18 "relative h-2 w-full grow overflow-hidden rounded-full",19 "bg-white/10 backdrop-blur-xl border border-white/20",20 )}21 >22 <SliderPrimitive.Range23 className={cn(24 "absolute h-full rounded-full",25 "bg-linear-to-r from-cyan-400 via-blue-400 to-purple-400",26 "shadow-[0_0_8px_rgba(59,130,246,0.4)]",27 )}28 />29 </SliderPrimitive.Track>30 <SliderPrimitive.Thumb31 className={cn(32 "block h-5 w-5 rounded-full cursor-grab active:cursor-grabbing",33 "bg-white border-2 border-white/50",34 "shadow-[0_2px_10px_rgba(0,0,0,0.3)]",35 "transition-all duration-200",36 "hover:scale-110 hover:shadow-[0_0_16px_rgba(59,130,246,0.5)]",37 "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/50",38 "disabled:pointer-events-none disabled:opacity-50",39 )}40 />41 </SliderPrimitive.Root>42))43GlassSlider.displayName = SliderPrimitive.Root.displayName4445export { GlassSlider }
What it pulls in
npm packages
Files it writes
More from einui
All 44 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Base Widgetbase-widget | einui | Components | Free | 1 dep | |
| Calendar Widgetscalendar-widget | einui | Components | Free | 1 dep | |
| Clock Widgetsclock-widget | einui | Components | Free | 1 dep | |
| Glass Alert Dialogglass-alert-dialog | einui | Components | Free | 1 dep | |
| Glass Avatarglass-avatar | einui | Components | Free | 1 dep | |
| Glass Badgeglass-badge | einui | Components | Free | 1 dep | |
| Glass Breadcrumbglass-breadcrumb | einui | Components | Free | 1 dep | |
| Glass Buttonglass-button | einui | Components | Free | 2 deps |
