Card
Responsive Apple Liquid Glass container card with isolated-layer glass by default (preserving internal Switch/Slider droplet refraction), edge optical refraction, opaque glass={false} mode, and automatic Over-Glass nested grouping.
Fully compatible with the standard shadcn/ui JSX API (<Card> / <CardHeader> / <CardTitle> / <CardDescription> / <CardAction> / <CardContent> / <CardFooter>), built to Apple macOS 27 and iOS 27 guidelines:
- Isolated-layer Liquid Glass by default: Uses a sibling
-z-10backdrop layer so Chromium does not create a nested Backdrop Root, keeping optical droplet refraction intact for childSwitch,Slider, andTabscontrols. - Real optical edge refraction: Glass always mounts
<LiquidSurfaceBackdrop />for live SDF edge highlights (browsers without SVG backdrop filters fall back to frosted glass). - Opaque & nested Over-Glass adaptation: Pass
glass={false}for a 100% opaque card; when nested inside another glass surface (glass Card, Dialog, Popover, etc.), automatically switches to Over-Glass (matching macOS 27Group Boxes). ChildButton,Input, andTextareacontrols inside a glass Card also adapt automatically to Over-Glass.
Responsive Live Preview (Nested Group Card & Switch)
The outer card uses optical edge refraction while housing an automatic Over-Glass compact card and Switch; adjust the left sidebar's Glass Tint and Accent Color to inspect live changes:
Installation (Shadcn Registry)
npx shadcn@latest add @apple-liquid/cardCompact Notification Card (Small)
Use size="sm" for tighter corner radii and padding in notification summaries or sidebar widgets:
Usage
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from '@/components/ui/card';
export function Example() {
return (
<Card>
<CardHeader>
<CardTitle>iCloud+ Sync</CardTitle>
<CardDescription>Keep documents and photos up to date across all devices.</CardDescription>
</CardHeader>
<CardContent>128 GB of 2 TB used</CardContent>
</Card>
);
}Props API
Card
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'default' | 'sm' | 'default' | Density and corner radius (26px/22px default, 20px/16px for sm) |
glass | boolean | true | Liquid Glass material reacting to glass tint; false renders a 100% opaque surface. Automatically switches to Over-Glass when placed on a glass surface |
surface | 'default' | 'over-glass' | Auto-detected | Surface context; automatically 'over-glass' inside glass containers, or pass explicitly to override |
Calendar
Responsive Apple Liquid Glass calendar and date picker featuring circular Apple Blue selection pills, soft continuous range bands, month/year dropdown jumps, and seamless Popover / Drawer composition.
Carousel
Embla-powered carousel with circular Apple 27 Liquid Glass navigation buttons (glass secondary) by default, supporting horizontal and vertical orientations.