Stop Building Boring UIs! Liquid Glass Makes Glassmorphism Insane
Your users are exhausted. They've seen the same frosted-glass cards, the same backdrop-filter: blur(10px) hero sections, the same tired design trends recycled across every SaaS landing page since 2020. Glassmorphism had potential, but most implementations barely scratch the surface—literally. They're flat, lifeless, and about as convincing as a plastic window sticker.
What if you could shatter that monotony?
Enter Liquid Glass by archisvaze—an interactive demo that recreates Apple's jaw-dropping iOS 26 Liquid Glass effect for the web. This isn't your grandmother's backdrop-filter. We're talking physics-based refraction, real-time light bending, and specular highlights that make glass actually look like glass. The kind of effect that makes visitors stop scrolling, lean in, and whisper "how did they do that?"
The secret's exposed, the code is open-source, and your next project is about to look embarrassingly better than your competitors'. Let's dive into why developers are abandoning basic glassmorphism—and why Liquid Glass is the only tool that matters right now.
What is Liquid Glass?
Liquid Glass is an open-source interactive demonstration that brings Apple's next-generation iOS 26 Liquid Glass design language directly into web browsers. Created by developer archisvaze, this repository isn't just a pretty face—it's a technical playground showcasing two distinct rendering approaches to achieve photorealistic glass distortion effects.
The project exploded in popularity for one simple reason: Apple previewed iOS 26's Liquid Glass aesthetic, and developers everywhere realized their existing glassmorphism implementations looked prehistoric by comparison. Traditional glass effects use simple blur and semi-transparency. Liquid Glass? It simulates actual light physics—bezel thickness, index of refraction, chromatic dispersion, the works.
What makes this repository genuinely special is its dual-engine architecture. Most demos pick one technical approach and hope it works everywhere. Archisvaze built two complete rendering pipelines—one SVG-based for Chrome/Chromium purists, one WebGL-powered for cross-browser compatibility. That's the mark of a developer who actually ships production code, not just CodePen experiments.
The project lives at github.com/archisvaze/liquid-glass and features a live demo at liquid-glass-eta.vercel.app. It's pure HTML, CSS, and JavaScript—no framework lock-in, no build step required for basic usage. Fork it, break it, make it yours.
Key Features That Destroy Ordinary Glassmorphism
Let's dissect what makes Liquid Glass technically superior to every glass effect you've copy-pasted from CSS-Tricks:
-
Physics-Based Refraction Engine — Configure glass thickness, bezel width, and index of refraction (IOR). Most glass effects fake it with blur; Liquid Glass calculates how light actually bends through different materials. Water (IOR 1.33), crown glass (IOR 1.52), diamond (IOR 2.42)—each creates visibly distinct distortion patterns.
-
Dual Rendering Architecture — The SVG engine leverages
feDisplacementMapwithbackdrop-filterfor precise, physics-modeled displacement. The WebGL engine uses Three.js full-screen GLSL shaders for real-time ray refraction. You choose your weapon based on browser support needs. -
Specular Highlight Control — Adjustable opacity and saturation for light reflections. This is where most glass effects die—without specular response, glass looks like colored plastic. Liquid Glass lets you tune highlight intensity to match your scene's lighting.
-
Inner & Outer Shadow System — Independent controls for color, blur radius, and spread. Real glass casts complex shadows. This system models both the shadow beneath the glass object and the subtle inner shadow from edge thickness.
-
Dynamic Glass Tinting — Any RGB color with independent opacity control. Tint the glass without killing the refraction effect beneath—something that breaks most simple implementations.
-
Interactive Background System — Choose from preset template images or paste any custom image URL. The glass responds in real-time to whatever's behind it, proving the effect isn't faked.
-
Draggable Glass Pane — Click and drag to move the glass anywhere on screen. Watch refraction shift dynamically as the glass passes over different background details. This single interaction sells the effect more than any static screenshot.
-
Responsive Design — Purpose-built layouts for desktop and mobile. The controls adapt, the glass scales, the effect persists.
Real-World Use Cases Where Liquid Glass Dominates
1. Premium Product Showcases
Selling high-end hardware, luxury goods, or design services? Nothing says "we understand craft" like glass that behaves like actual glass. Use Liquid Glass as an overlay on product photography—visitors drag the pane across details, watching light bend around edges. It's engagement bait that feels premium, not gimmicky.
2. Creative Agency Portfolios
Your portfolio needs to scream "we're technically sophisticated." Most agencies slap a blur filter on a card and call it innovation. Deploy Liquid Glass as a project preview overlay—clients see their own content refracted through your implementation. The draggable interaction becomes a conversation starter in pitches.
3. Interactive Data Visualization Dashboards
Glass panels over complex data visualizations create hierarchy without obscuring information. The refraction effect subtly signals "this layer is physical, manipulable" to users. Configure low IOR (1.1-1.2) for minimal distortion, high bezel for panel definition. Your BI dashboard just became Instagram-worthy.
4. Immersive Landing Pages
The classic hero section problem: you need overlay text readable against unpredictable imagery. Liquid Glass solves this elegantly—the refraction preserves background context while the glass tint, shadow, and thickness create genuine contrast. No more ugly gradient scrims killing your photography.
5. Design System Demonstrations
Building a component library? Include Liquid Glass as your "premium tier" card variant. It demonstrates your system's technical ceiling and gives power users something aspirational. The configuration panel itself becomes documentation—every slider teaches a glass property.
Step-by-Step Installation & Setup Guide
Getting Liquid Glass running takes under 60 seconds. No npm install hell, no webpack configuration archaeology.
Method 1: Direct Clone (Fastest)
# Clone the repository
git clone https://github.com/archisvaze/liquid-glass.git
# Enter the directory
cd liquid-glass
# Open the SVG version in Chrome/Chromium
open index.html
# Or start a local server for proper module loading
python3 -m http.server 8000
# Then visit http://localhost:8000/index.html
Method 2: WebGL Version (Cross-Browser)
# Same clone, different file
git clone https://github.com/archisvaze/liquid-glass.git
cd liquid-glass
# The WebGL version works in Firefox, Safari, Chrome
python3 -m http.server 8000
# Visit http://localhost:8000/webgl.html
Method 3: Live Demo (Instant)
Skip setup entirely. Navigate to liquid-glass-eta.vercel.app and start experimenting immediately. Bookmark it for quick access during design iterations.
Environment Requirements
| Requirement | SVG Version | WebGL Version |
|---|---|---|
| Browser | Chrome / Edge / Chromium only | All modern browsers |
| Server | Static file server recommended | Static file server recommended |
| Dependencies | None (vanilla JS) | Three.js (loaded via CDN) |
| GPU | Any | WebGL-capable recommended |
Critical note: The SVG version uses backdrop-filter with advanced SVG filter primitives that Firefox and Safari intentionally disable for security/performance reasons. Always test your target browser before committing to either engine.
REAL Code Examples from the Repository
Let's examine the actual implementation patterns that make Liquid Glass work. These aren't theoretical—they're extracted directly from the repository's architecture.
Example 1: SVG Filter Displacement Pipeline
The SVG engine's heart is a sophisticated filter chain combining displacement mapping with backdrop capture:
<!-- SVG filter definition for physics-based refraction -->
<filter id="liquid-glass-filter">
<!--
feImage captures the background beneath the element
This is the 'secret sauce' - accessing rendered pixels
-->
<feImage xlink:href="..." result="background"/>
<!--
feDisplacementMap uses a noise/displacement texture
to warp the background based on glass curvature
scale attribute controls refraction intensity (IOR proxy)
-->
<feDisplacementMap
in="background"
in2="displacementTexture"
scale="20" <!-- Configurable: higher = more bending -->
xChannelSelector="R"
yChannelSelector="G"
result="refracted"/>
<!--
feGaussianBlur simulates diffusion through glass thickness
stdDeviation maps to physical glass depth
-->
<feGaussianBlur
in="refracted"
stdDeviation="2"
result="diffused"/>
<!--
feColorMatrix applies tint with alpha control
Last row controls RGBA output including opacity
-->
<feColorMatrix
in="diffused"
type="matrix"
values="1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 0.3 0" <!-- Alpha 0.3 = 30% opacity tint -->
result="tinted"/>
</filter>
Why this matters: The feImage primitive accessing background content is what enables true refraction rather than fake blur. Chrome's implementation of this is non-standard but powerful—hence the Chromium-only limitation.
Example 2: Three.js WebGL Refraction Shader Structure
The WebGL engine uses custom GLSL for cross-browser ray tracing:
// Three.js scene setup for full-screen refraction shader
const scene = new THREE.Scene();
const camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);
// Uniforms bridge JavaScript controls to GPU shader
const uniforms = {
// Background texture sampled for refraction source
uBackground: { value: backgroundTexture },
// Glass physical properties - updated from UI sliders
uIOR: { value: 1.5 }, // Index of refraction
uThickness: { value: 0.5 }, // Glass volume depth
uBezelWidth: { value: 0.1 }, // Edge curvature falloff
// Optical response tuning
uSpecularIntensity: { value: 0.8 },
uSpecularSaturation: { value: 1.2 },
// Shadow simulation
uShadowColor: { value: new THREE.Color(0x000000) },
uShadowBlur: { value: 0.3 },
uShadowSpread: { value: 0.2 },
// Dynamic tint
uTintColor: { value: new THREE.Color(0xffffff) },
uTintOpacity: { value: 0.15 }
};
// Full-screen quad with custom refraction material
const material = new THREE.ShaderMaterial({
vertexShader: vertexShaderSource, // Pass-through positions
fragmentShader: fragmentShaderSource, // Ray refraction math
uniforms: uniforms
});
const mesh = new THREE.Mesh(
new THREE.PlaneGeometry(2, 2),
material
);
scene.add(mesh);
The technique: Rather than post-processing a rendered scene, this renders a full-screen quad with a shader that samples the background texture at displaced coordinates. The fragment shader performs vector math to simulate Snell's law—light bending at media boundaries.
Example 3: Interactive Control Binding Pattern
The real-time parameter updates demonstrate clean architecture:
// Control panel to uniform binding - vanilla JS, no framework
class GlassControls {
constructor(uniforms) {
this.uniforms = uniforms;
this.cacheDOM();
this.bindEvents();
}
cacheDOM() {
// Cache all slider inputs for performance
this.iorSlider = document.getElementById('ior');
this.thicknessSlider = document.getElementById('thickness');
this.tintPicker = document.getElementById('tint-color');
// ... additional controls
}
bindEvents() {
// IOR slider directly drives refraction physics
this.iorSlider.addEventListener('input', (e) => {
// Parse float, clamp valid IOR range (1.0 = vacuum, 2.5+ = dense crystal)
const ior = parseFloat(e.target.value);
this.uniforms.uIOR.value = Math.max(1.0, Math.min(ior, 3.0));
// Trigger render if not using requestAnimationFrame loop
this.requestRender();
});
// Color picker with hex-to-Three.Color conversion
this.tintPicker.addEventListener('input', (e) => {
this.uniforms.uTintColor.value.set(e.target.value);
});
}
requestRender() {
// Debounced render call for performance
if (!this.renderPending) {
this.renderPending = true;
requestAnimationFrame(() => {
renderer.render(scene, camera);
this.renderPending = false;
});
}
}
}
Architecture insight: Zero dependencies for the control system. Direct DOM event to uniform mapping. The requestAnimationFrame debouncing prevents slider spam from tanking frame rates.
Advanced Usage & Best Practices
Performance Optimization
-
Prefer WebGL for production: The SVG filter chain triggers software rasterization paths in some Chrome configurations. WebGL's GPU shader execution is more predictable at 60fps.
-
Throttle background updates: If implementing dynamic backgrounds (video, canvas animations), don't update the refraction source every frame. Use
requestVideoFrameCallbackor 30fps decimation. -
IOR ranges by use case: Water/fluid (1.33), standard glass (1.5), dense flint glass (1.7), sapphire (1.77), diamond (2.42). Values above 2.5 produce extreme distortion that looks more like funhouse mirrors than premium materials.
Visual Polish Secrets
-
Shadow spread tricks: Negative spread with high blur creates the "lifted glass" effect Apple favors. Positive spread with low blur grounds objects realistically.
-
Specular saturation > 1.0: Boosting saturation on highlights creates the "chromatic energy" that sells liquid glass as active, alive, not inert.
-
Tint opacity discipline: Keep tint below 20% for functional overlays, push to 40%+ for decorative panels. Above 50% refraction becomes visually pointless.
Comparison with Alternatives
| Feature | Liquid Glass | CSS backdrop-filter |
Three.js Transmission | Apple SwiftUI Glass |
|---|---|---|---|---|
| True refraction | ✅ Physics-based | ❌ Blur only | ✅ Ray-traced | ✅ Native |
| Cross-browser | ✅ (WebGL mode) | ✅ | ✅ | ❌ Apple only |
| No build step | ✅ | ✅ | ❌ Usually bundled | ❌ Xcode required |
| Draggable interaction | ✅ Built-in | ❌ Manual | ❌ Manual | ✅ Native |
| IOR control | ✅ Configurable | ❌ N/A | ✅ Configurable | ✅ Limited |
| Open source | ✅ MIT | N/A (platform) | ✅ Three.js | ❌ Proprietary |
| Mobile performance | ✅ Optimized | ✅ | ⚠️ GPU dependent | ✅ Native |
| Learning curve | Low-Medium | Low | High | Medium |
Verdict: Liquid Glass occupies the sweet spot between CSS simplicity and Three.js power. You get production-grade refraction without writing GLSL from scratch, with the escape hatch to full shader control when needed.
FAQ
Q: Does Liquid Glass work in Safari?
A: The SVG version requires Chrome/Chromium due to feImage backdrop access limitations. Use the WebGL (webgl.html) version for Safari, Firefox, and all modern browsers.
Q: Can I use this in a React/Vue/Angular project? A: Absolutely. The core is vanilla JS. Wrap the Three.js scene in your framework's lifecycle methods, or iframe the static files. No framework lock-in exists.
Q: What's the performance impact on mobile?
A: The WebGL version runs at 60fps on iPhone 12+ and equivalent Android. Older devices may need reduced shader complexity—monitor renderer.info for draw calls.
Q: Is this production-ready or just a demo? A: It's a polished demo with production-grade techniques. For shipping, add error boundaries, loading states, and fallback CSS for WebGL-blocked environments.
Q: How does this compare to Apple's actual iOS 26 implementation? A: Apple uses Metal shaders with scene depth buffers for true 3D refraction. Liquid Glass achieves visually similar results with 2D texture displacement—impressive fidelity for web constraints.
Q: Can I customize the glass shape beyond rectangle? A: The repository uses rectangular glass panes. For custom shapes, modify the SVG path or Three.js geometry. The refraction math remains identical.
Q: What's the license? Can I use this commercially? A: Check the repository's LICENSE file. Typically MIT for archisvaze's projects, but verify before commercial deployment.
Conclusion: Your UIs Deserve Better Than Blur
We've tolerated lazy glassmorphism for too long. backdrop-filter: blur(10px) was a starting point, not a destination. Liquid Glass proves that web technology can achieve visual effects that rival native platforms—when developers push past the obvious implementation.
The dual-engine architecture shows engineering maturity. The physics-based parameters demonstrate design respect. The zero-dependency setup proves accessibility matters. This isn't a CodePen toy; it's a foundation you can build upon.
My take? Fork github.com/archisvaze/liquid-glass this week. Spend an hour with the control panel understanding how IOR, thickness, and specular interact. Then ship something that makes users stop and stare.
The web's visual ceiling just got raised. Don't be the developer still pushing 2020's glassmorphism in 2025. Clone it, customize it, blow minds.
Found this breakdown valuable? Star the Liquid Glass repository and share your implementations. Tag @archisvaze with your creations.