Building Glass for the Web
How we built a cross-browser glass effect for the web, and how it shapes a family of components.
aave.com/design/building-glass-for-the-webHow we built a cross-browser glass effect for the web, and how it shapes a family of components.
aave.com/design/building-glass-for-the-webIn June last year Apple announced Liquid Glass at WWDC, a fresh design language built around the physics of light bending through curved glass. It was a bold move that immediately captured the imagination of designers and developers alike. We felt inspired to bring that same magic to our apps, starting by bringing our own version of the effect to our Aave App for iOS and Android, which we call Aave Glass. This quickly became a defining part of the Aave App experience, making our interfaces feel more alive and tactile. The challenge with the web In the months that followed WWDC, we saw a wave of interest from others who also felt inspired to recreate the effect for the web. Most of the demos and experiments that surfaced only ran in Chromium browsers. They leaned on either an SVG backdrop-filter approach or the experimental HTML-in-Canvas API hidden behind a flag, and neither holds up in other browsers. Before building our own, we worked through the approaches already going around. Our technique runs in every modern browser, on desktop and on mobile, with no flags to turn on and no fallbacks to maintain. It just works. Building a cross-browser effect that works on any content was only the first step. We wanted to make sure it could be used in real interfaces, and that it could bring the same sense of delight to our web experiences as it does in our mobile apps. So we built a family of components that use the glass as a core part of their experience. Mobile apps rely on switches for binary choices, and glass suits them well. The thumb of the switch is a small lens that creates a moving highlight as you toggle. The content renders normally and stays visible everywhere outside the lens, the whole ideology behind our technique is that it refracts live HTML, the real rendered content. To achieve the glass effect on the handle we give our glass component a copy of the track's fill that sits on its own layer and gets bent by the glass. The fill registers as a moving highlight that gives the switch a sense of depth and tactility. <Glass lens={{ lensW: 90, lensH: 60, borderRadius: 30 }} x={progress} // lens acts as the thumb (0–1 across the track) > <SwitchTrack /> </Glass> A slider is also a natural home for the effect. The glass travels along the track, refracting the fill beneath it as it goes, and the value you're setting stays visible right through the glass.…
crawled Sep 8, 2026
Nearest neighbours by embedding distance, computed at index time.
We should be giving all agents tools that excel at what’s important for an AI model. Kitesurf is Cloudflare’s new stateless,…
An open source component library of creative html-in-canvas effects for React, Solid, Preact, Vue, Svelte, and vanilla JS. Every…
An open source component library of creative html-in-canvas effects for React, Solid, Preact, Vue, Svelte, and vanilla JS. Every…
Beautifully designed, copy-paste UI components for AI agent conversations: thinking states, tool calls, streaming text,…