Components
Checkbox
Responsive Apple Liquid Glass checkbox with unified rounded-square semantics across platforms (square for multi-select, circle for radio), larger mobile touch targets, macOS 27 desktop precision, indeterminate state, orthogonal glass, and spring check animation.
Fully compatible with the standard shadcn/ui JSX API (<Checkbox>), adapting cleanly across platforms using pure CSS viewport breakpoints (md: / 768px):
- Unified semantics: Keeps a rounded square silhouette on both desktop and mobile to stay visually distinct from circular
RadioGroupcontrols. - Desktop (
>= 768px· macOS 27): Aligned with Apple macOS 27 UI Kit3 Rg, defaulting to16×16(5pxradius) with a subtle translucent unchecked surface and high-contrast Apple Blue glossy fill when checked or indeterminate. - Mobile (
< 768px· iOS 27): Preserves the rounded-square shape while expanding to22×22(6pxradius) with an enlarged hit target for effortless thumb tapping. - Indeterminate & motion: Native support for
indeterminate(centered rounded dash) andmotion/reactspring check indicator, respectingprefers-reduced-motion.
Responsive Live Preview (Select All & Indeterminate)
Toggle child items below to watch the top "Select All" checkbox transition between checked, mixed, and unchecked states; switch Desktop / Mobile in the top-right to compare sizing:
Installation (Shadcn Registry)
npx shadcn@latest add @apple-liquid/checkboxSize Scale & Disabled States
Includes sm, default, and lg responsive sizes calibrated for mobile touch and desktop precision:
Usage
import { Checkbox } from '@/components/ui/checkbox';
export function Example() {
return (
<label className="flex items-center gap-2.5">
<Checkbox defaultChecked />
<span className="text-sm">Automatically sync iCloud data</span>
</label>
);
}Props API
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'default' | 'lg' | 'default' | Size scale (rounded square: mobile 18/22/26px ↔ desktop 14/16/20px) |
glass | boolean | true | Unchecked state uses Liquid Glass reacting to global tint; false renders 100% opaque Bordered fill |
indeterminate | boolean | false | Displays the macOS 27 centered dash indeterminate state |
disableMotion | boolean | false | Disable the check indicator spring scale animation |