Individual skill
liquid-glass-web
Build refractive "liquid glass" UI for the web (Apple Liquid Glass style) that renders the same in Chrome, Safari/iOS and Firefox — SVG feDisplacementMap applied through CSS filter to the content itself, runtime displacement maps, chromatic fringe and rim highlights, press/squish springs, WebKit-specific fixes, WebGL for video. Ships the liquidglass.dev web components (switch, slider, segmented, button, panel, navbar, menu bar, toast, dock, lens), the zero-dependency engine, a reference page and a three-engine screenshot script. Use whenever a web or front-end task (HTML/CSS/React/Vue/Svelte) asks for liquid glass, glass refraction, a glass lens or magnifier, glassmorphism that should actually bend light, or Apple-style glass switches, sliders, segmented controls, tab indicators, cards, navbars, menus, toasts or docks — and when a backdrop-filter glass effect does not show up in Safari or Firefox. Not for native SwiftUI/UIKit apps (use the system glassEffect there).
skill/liquid-glass-web/SKILL.md
Source commit 068ad226f53e1ca62d857f78bdc32f58f3c5fce7
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 7, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 25
- Repository last updated
- Oct 30, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agent-skills Repository topic
- css Repository topic
- glassmorphism Repository topic
- liquid-glass Repository topic
- svg-filters Repository topic
- web-components Repository topic
- design Derived category
- writing Derived category
- engineering Derived category
- design-interface Derived category
- engineering-web Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 12,279 bytesSKILL.mdcore · 12,279 bytesagents/openai.yamlasset · 296 bytesassets/components.jsruns · 56,834 bytesassets/demo.htmlasset · 33,954 bytesassets/glass-webgl.jsruns · 7,209 bytesassets/liquid-glass.jsruns · 24,816 bytesreferences/browser-quirks.mddoc · 7,906 bytesreferences/components.mddoc · 4,906 bytesreferences/optics.mddoc · 5,347 bytesreferences/patterns.mddoc · 12,356 bytesscripts/chrome-shot.mjsruns · 4,417 bytesscripts/serve.pyruns · 2,392 bytesscripts/shoot.shruns · 2,113 bytesscripts/snap-webkit.swiftasset · 2,470 bytes
Read excerpt
# Liquid glass for the web
Goal: glass that really bends light, like Apple's Liquid Glass, rather than a blur — and looks the same in Chromium, WebKit (Safari and every iOS browser) and Gecko (Firefox). The approach follows Aave Labs' [Building Glass for the Web](https://aave.com/design/building-glass-for-the-web); the bundled code is an independent implementation, verified screenshot-by-screenshot in all three engines. Live site and docs: https://liquidglass.dev.
## How it works
1. **Refraction goes on `filter: url(#id)`, not `backdrop-filter`.** `backdrop-filter: url()` only renders in Chromium. A plain `filter` referencing an SVG filter works everywhere, but it bends the element's *own* pixels — so whatever should be bent must be inside the glass element: the real content, or a decorative copy of it.
2. **The displacement map is generated at runtime from the lens shape.** Red/green = horizontal/vertical bend, blue = rim highlight, alpha = lens coverage, neutral grey 128 outside the lens. Pixels outside the lens pass through untouched, so text stays selectable and links clickable.
3. **Moving is cheap, reshaping regenerates.** Moving a lens only changes filter sub-region coordinates; the map is redrawn only when shape or optics change (cached, only a quarter computed).
4. **Surfaces without live DOM use WebGL with the same map.** Safari never runs SVG filters on a playing `<video>`; canvas content has no DOM either.
## Step 1 — pick the path
**Fastest: the ready-made web components.** If the project can load an ES module, use `assets/components.js` (copy it next to `assets/liquid-glass.js`, or load `https://liquidglass.dev/lib/components.js`). Elements: `lg-switch`, `lg-slider`, `lg-segmented`, `lg-button`, `lg-panel`, `lg-navbar`, `lg-menubar` + `lg-menu`, `toast()`, `lg-dock`, `lg-lens`. Usage, attributes and theming variables: [references/components.md](references/components.md).