Glass Select
einui/glass-selectFreeComponent
A liquid glass styled select dropdown with frosted glass styling.
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-select.jsonSource
1"use client"23import * as React from "react"4import * as SelectPrimitive from "@radix-ui/react-select"5import { Check, ChevronDown, ChevronUp } from "lucide-react"6import { cn } from "@/lib/utils"78const GlassSelect = SelectPrimitive.Root910const GlassSelectGroup = SelectPrimitive.Group1112const GlassSelectValue = SelectPrimitive.Value1314const GlassSelectTrigger = React.forwardRef<15 React.ElementRef<typeof SelectPrimitive.Trigger>,16 React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>17>(({ className, children, ...props }, ref) => (18 <SelectPrimitive.Trigger19 ref={ref}20 className={cn(21 "flex h-10 w-full items-center justify-between gap-2 rounded-xl px-4 py-2 text-sm",22 "bg-white/10 backdrop-blur-xl border border-white/20",23 "text-white placeholder:text-white/40",24 "shadow-[0_4px_16px_rgba(0,0,0,0.2)]",25 "transition-all duration-300",26 "focus:outline-none focus:border-white/40 focus:bg-white/15",27 "focus:ring-2 focus:ring-cyan-400/30 focus:ring-offset-0",28 "disabled:cursor-not-allowed disabled:opacity-50",29 "[&>span]:line-clamp-1",30 className,31 )}32 {...props}33 >34 {children}35 <SelectPrimitive.Icon asChild>36 <ChevronDown className="h-4 w-4 text-white/60" />37 </SelectPrimitive.Icon>38 </SelectPrimitive.Trigger>39))40GlassSelectTrigger.displayName = SelectPrimitive.Trigger.displayName4142const GlassSelectScrollUpButton = React.forwardRef<43 React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,44 React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>45>(({ className, ...props }, ref) => (46 <SelectPrimitive.ScrollUpButton47 ref={ref}48 className={cn("flex cursor-default items-center justify-center py-1", className)}49 {...props}50 >51 <ChevronUp className="h-4 w-4 text-white/60" />52 </SelectPrimitive.ScrollUpButton>53))54GlassSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName5556const GlassSelectScrollDownButton = React.forwardRef<57 React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,58 React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>59>(({ className, ...props }, ref) => (60 <SelectPrimitive.ScrollDownButton61 ref={ref}62 className={cn("flex cursor-default items-center justify-center py-1", className)}63 {...props}64 >65 <ChevronDown className="h-4 w-4 text-white/60" />66 </SelectPrimitive.ScrollDownButton>67))68GlassSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName6970// … truncated
What it pulls in
npm packages
Files it writes
More from einui
All 42 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 |
