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.
Fully compatible with the standard shadcn/ui JSX API (InputGroup / InputGroupAddon / InputGroupInput / InputGroupTextarea / InputGroupButton / InputGroupText):
- Unified capsule surface:
InputGrouprenders the outer surface matchingInputheights (44px mobile ↔ 34px desktop) while inner controls stay transparent inside the same pill. - Default Liquid Glass: Shares
Regular - Smallmaterial and SDF refraction with glassInput/Button; passglass={false}for a 100% opaque white input. - Automatic Over-Glass switching: Switches to Over-Glass flat fill when nested on a glass surface, propagating automatically to child
InputGroupButtons. - Multiline layout: Automatically switches to a rounded rectangle (18px mobile ↔ 12px desktop) when containing
InputGroupTextareaorblock-start/block-endaddons.
Liquid Glass Search & Address Bar
Installation (Shadcn Registry)
npx shadcn@latest add @apple-liquid/input-groupPrefix & Suffix Addons
Text prefix, keyboard shortcut suffix, size="sm" unit suffix, and invalid state (all with glass={false}):
Multiline Composer & Footer Actions
Over-Glass Surface Adaptation
Usage
import { SearchIcon } from 'lucide-react';
import {
InputGroup,
InputGroupAddon,
InputGroupInput,
} from '@/components/ui/input-group';
export function Example() {
return (
<InputGroup>
<InputGroupAddon>
<SearchIcon />
</InputGroupAddon>
<InputGroupInput placeholder="Search" />
</InputGroup>
);
}Props API
InputGroup
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'default' | 'lg' | 'default' | Input height, synced automatically to InputGroupInput |
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 | Manually override the hosting surface context |
InputGroupAddon
| Prop | Type | Default | Description |
|---|---|---|---|
align | 'inline-start' | 'inline-end' | 'block-start' | 'block-end' | 'inline-start' | Addon placement; clicking empty addon space focuses the input |
InputGroupButton
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'xs' | 'sm' | 'icon-xs' | 'icon-sm' | 'xs' | Follows Button size scale |
variant | Button['variant'] | 'ghost' | Semantic button variant |
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.
InputOTP
Apple 27 one-time passcode input with discrete rounded slots, accent focus ring and caret, sized 48×56 on mobile ↔ 34×40 on desktop.