Input
Responsive Apple Liquid Glass single-line text input aligned with macOS 27 and iOS 27 Text Fields guidelines, featuring a 3.5px Apple Blue focus ring, anti-zoom Safari font sizing, and glass/over-glass surface adaptation.
Fully compatible with the standard shadcn/ui JSX API (<Input>), adapting responsively to Apple macOS 27 and iOS 27 Text Fields specs:
- Desktop (
>= 768px· macOS 27): Full-pill silhouette (rounded-full) by default with compact heights (sm: 28px,default: 34px,lg: 40px),13pxtypography, and a3.5pxApple Blue focus ring and caret (override radius viaclassNameif needed). - Mobile (
< 768px· iOS 27): Preserves the capsule silhouette while expanding to generous touch heights (36/44/48px) and16pxfont size to prevent iOS Safari auto-zoom on focus. - Default Liquid Glass: Reacts live to
--liquid-glass-tint, sharingRegular - Smallmaterial and SDF edge refraction with glassButton(automatically falling back to frosted glass on Safari/Firefox). Passglass={false}for a high-contrast opaque input; insideDialog,Popover,Sheet, or glassCard, it automatically switches to an Over-Glass recessed fill.
Responsive Live Preview
Top shows the default Liquid Glass pill search input; bottom shows an input inside a glass Card automatically adapting to Over-Glass. Switch Desktop / Mobile in the top-right to compare heights and typography:
Installation (Shadcn Registry)
npx shadcn@latest add @apple-liquid/inputSize Scale
Available in sm, default, and lg responsive sizes:
Validation, Disabled & Password States
Supports aria-invalid Apple Red error rings, disabled states, and all native <input> types including password and file:
Usage
import { Input } from '@/components/ui/input';
export function Example() {
return <Input type="email" placeholder="name@icloud.com" />;
}Props API
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'default' | 'lg' | 'default' | Size scale (mobile 36/44/48px ↔ desktop 28/34/40px) |
glass | boolean | true | Liquid Glass control material; false renders 100% opaque Bordered equivalent; auto-switches to Over-Glass on glass surfaces |
surface | 'default' | 'over-glass' | Auto-detected | Surface context; automatically 'over-glass' inside glass containers, or pass explicitly to override |
Icon Picker
Pick any of 200k+ Iconify icons — search by keyword or browse a set — from a Select-style trigger that opens a Liquid Glass popover on desktop and an iOS 27 bottom Drawer on mobile. DynamicIcon renders any icon by name.
InputGroup
Apple 27 Text Fields-compliant composite input uniting search bars, address bars, and message composers in one capsule surface with default Liquid Glass and automatic Over-Glass switching.