Skip to Content
Liquid Glass UI
Components

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), 13px typography, and a 3.5px Apple Blue focus ring and caret (override radius via className if needed).
  • Mobile (< 768px · iOS 27): Preserves the capsule silhouette while expanding to generous touch heights (36/44/48px) and 16px font size to prevent iOS Safari auto-zoom on focus.
  • Default Liquid Glass: Reacts live to --liquid-glass-tint, sharing Regular - Small material and SDF edge refraction with glass Button (automatically falling back to frosted glass on Safari/Firefox). Pass glass={false} for a high-contrast opaque input; inside Dialog, Popover, Sheet, or glass Card, 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:

apple-liquid-ui/preview/input-liquid-hero
MacBook · 16:10

Installation (Shadcn Registry)

npx shadcn@latest add @apple-liquid/input

Size Scale

Available in sm, default, and lg responsive sizes:

apple-liquid-ui/preview/input-sizes
MacBook · 16:10

Validation, Disabled & Password States

Supports aria-invalid Apple Red error rings, disabled states, and all native <input> types including password and file:

apple-liquid-ui/preview/input-states
MacBook · 16:10

Usage

import { Input } from '@/components/ui/input';

export function Example() {
  return <Input type="email" placeholder="name@icloud.com" />;
}

Props API

PropTypeDefaultDescription
size'sm' | 'default' | 'lg''default'Size scale (mobile 36/44/48px ↔ desktop 28/34/40px)
glassbooleantrueLiquid Glass control material; false renders 100% opaque Bordered equivalent; auto-switches to Over-Glass on glass surfaces
surface'default' | 'over-glass'Auto-detectedSurface context; automatically 'over-glass' inside glass containers, or pass explicitly to override

On this page