Skip to Content
Liquid Glass UI
Components

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-10 backdrop layer so Chromium does not create a nested Backdrop Root, keeping optical droplet refraction intact for child Switch, Slider, and Tabs controls.
  • 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 27 Group Boxes). Child Button, Input, and Textarea controls 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:

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

Installation (Shadcn Registry)

npx shadcn@latest add @apple-liquid/card

Compact Notification Card (Small)

Use size="sm" for tighter corner radii and padding in notification summaries or sidebar widgets:

apple-liquid-ui/preview/card-compact
MacBook · 16:10

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

PropTypeDefaultDescription
size'default' | 'sm''default'Density and corner radius (26px/22px default, 20px/16px for sm)
glassbooleantrueLiquid 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-detectedSurface context; automatically 'over-glass' inside glass containers, or pass explicitly to override

On this page