Input
crenspire-glass-ui/inputFreeComponent
Displays a form input field with optional glassy variant.
Live preview
live · rendered by the registry
Rendered by crenspire/glass-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glass-ui.crenspire.com/r/input.jsonSource
1"use client"23import * as React from "react"4import { Input as BaseInput } from "@/components/ui/input"5import { cn } from "@/lib/utils"6import type { GlassCustomization } from "@/lib/glass-utils"7import { hoverEffects, type HoverEffect } from "@/lib/hover-effects"89export interface InputProps extends Omit<React.ComponentProps<typeof BaseInput>, "glass"> {10 icon?: React.ReactNode11 error?: boolean12 hover?: HoverEffect13 glass?: GlassCustomization14}1516/**17 * Glass UI Input - A beautifully designed input component with glassy effects18 * Built on top of the base Input component with enhanced visual styling19 *20 * @example21 * ```tsx22 * <Input23 * glass={{24 * color: "rgba(255, 255, 255, 0.15)",25 * blur: 15,26 * outline: "rgba(255, 255, 255, 0.3)"27 * }}28 * placeholder="Enter text..."29 * />30 * ```31 */32export const Input = React.forwardRef<HTMLInputElement, InputProps>(33 ({ className, variant = "glass", icon, error, hover = "none", glass, ...props }, ref) => {34 return (35 <div className="relative">36 {icon && (37 <div className="absolute left-3 top-1/2 -translate-y-1/2 z-10 text-muted-foreground pointer-events-none">38 {icon}39 </div>40 )}41 <BaseInput42 ref={ref}43 variant={variant}44 glass={glass}45 className={cn(46 "relative overflow-hidden",47 icon && "pl-10",48 error && "border-destructive focus-visible:ring-destructive",49 "transition-all duration-200 focus-visible:scale-[1.02]",50 hoverEffects({ hover }),51 className52 )}53 {...props}54 />55 </div>56 )57 }58)59Input.displayName = "Input"60
What it pulls in
Other registry items
Files it writes
More from crenspire/glass-ui
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | crenspire/glass-ui | Components | Free | 2 deps · 5 files | |
| Alertalert | crenspire/glass-ui | Components | Free | no deps · 5 files | |
| Alert Dialogalert-dialog | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Avataravatar | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Badgebadge | crenspire/glass-ui | Components | Free | no deps · 5 files | |
| Breadcrumbbreadcrumb | crenspire/glass-ui | Components | Free | 2 deps · 5 files | |
| Buttonbutton | crenspire/glass-ui | Components | Free | 1 dep · 5 files | |
| Button Groupbutton-group | crenspire/glass-ui | Components | Free | no deps · 5 files |
