Browse docsInput

Controls

Glass Input

A recessed glass text field with an optional label and hint.

Preview

Demos ready. Update 0.

Installation

For React 19+ apps with Tailwind CSS 4.

npx shadcn@4.14.1 add @glassyui/glass-input

Adds 5 files to components/glassyui and installs clsx.

Usage

Usage

import { GlassInput } from "@/components/glassyui/glass-input";

export function InputDemo() {
  return <GlassInput label="Project" placeholder="Glassy UI" hint="Visible over glass." />;
}

Examples

Email input

<GlassInput
  type="email"
  label="Email"
  placeholder="alex@example.com"
  hint="Used for registry updates."
/>

API reference

GlassInput

An input in a wrapper with its label and hint. className and ref go to the input.

PropTypeDefaultDescription
labelstringNoneVisible label above the field, linked with htmlFor.
hintstringNoneHelper text below the field, linked with aria-describedby.
typestring'text'Native input type.

Also accepts HTML input attributes.

Types
GlassInputProps
Accessibility
Without a label, name the field with aria-label.