An AI agent skill that teaches the full Apple Liquid Glass technique — from Snell's law physics to copy-paste React components. One install, everything your agent needs.
⚡ Full refraction effect visible in Chrome/Chromium. Other browsers show frosted blur.
What's included
From first principles to production-ready components — this skill has it all baked in.
The technique
SVG displacement maps + CSS backdrop-filter combine to simulate real light refraction through curved glass.
<!-- Four-layer composition --> <div class="glass"> <!-- Layer 0: Refraction filter --> <div class="glass__refract"></div> <!-- Layer 1: Semi-transparent tint --> <div class="glass__tint"></div> <!-- Layer 2: Specular rim highlight --> <div class="glass__specular"></div> <!-- Layer 3: Your content --> <div class="glass__content">...</div> </div> /* CSS */ .glass__refract { position: absolute; inset: 0; /* Chrome only: SVG refraction via url() reference */ backdrop-filter: blur(12px) url(#liquid-glass) brightness(1.05); isolation: isolate; /* Required! */ } .glass__specular { box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), inset 0 -1px 0 rgba(255,255,255,0.15); }
<!-- Hidden SVG — paste anywhere in <body> --> <svg width="0" height="0" style="position:absolute;overflow:hidden"> <defs> <filter id="liquid-glass" color-interpolation-filters="sRGB" x="0%" y="0%" width="100%" height="100%"> <!-- Displacement map image --> <!-- R=X offset, G=Y offset, 128=neutral, 255=max positive --> <feImage result="dispMap" x="0" y="0" width="300" height="56" preserveAspectRatio="none" href="data:image/png;base64,..." /> <!-- Apply refraction: negative scale = magnifying (Apple-style) --> <feDisplacementMap in="SourceGraphic" in2="dispMap" scale="-35" xChannelSelector="R" yChannelSelector="G" /> </filter> </defs> </svg>
# Zero-dependency displacement map generator # No pip install needed — uses Python stdlib only # SDF mode (fast, great results): python scripts/generate-displacement-map.py \ --width 300 --height 56 --radius 28 \ --mode sdf --datauri # Snell's Law physics mode (precise glass simulation): python scripts/generate-displacement-map.py \ --width 300 --height 56 --radius 28 \ --mode snell --surface squircle --n2 1.5 \ --output map.png # Displacement encoding: # R = X offset (128 = neutral, 255 = max right, 0 = max left) # G = Y offset (128 = neutral, 255 = max down, 0 = max up ) # actual_px = (channel / 255 - 0.5) × scale
Skill contents
8 files. Everything an AI agent needs to implement Liquid Glass from scratch.
Compatibility
Full refraction requires Chrome. All others get graceful frosted blur — no `@supports` needed.