pallavag/liquid-glass-web-react — explained in plain English
Analysis updated 2026-05-18
Wrap a navbar or card in the lens component to add an Apple-style liquid glass effect.
Build a draggable glass magnifier that distorts content underneath as the user moves it.
Use the LiquidGlassEngine class directly in a non-React app for the same glass effect.
| pallavag/liquid-glass-web-react | cuzteam/cpapro | gamekohl/frame-ui | |
|---|---|---|---|
| Stars | 25 | 25 | 25 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | ops devops | developer |
Figures from each repo's GitHub metadata at analysis time.
Safari limits the size of content SVG filters can process, so very large lens regions may degrade there.
liquid-glass-web-react is a React library that places a transparent lens over your page content, bending the pixels underneath to create the appearance of thick curved glass, similar to the visual style Apple introduced in recent versions of its operating systems. Unlike most similar libraries that only work in Chrome, this one uses an SVG displacement map technique that works in Chrome, Safari, and Firefox on both desktop and mobile, with no special settings required. The lens is a React component you wrap around any content. It bends the actual rendered pixels of whatever sits below it, so text stays selectable, links remain clickable, and video keeps playing underneath the glass. When you move the lens to a new position, only the filter region updates, not the displacement map itself. The map only regenerates when the shape of the lens changes, which keeps dragging smooth at a steady frame rate. You can adjust a range of optical properties: the refraction strength, the amount of chromatic aberration (color fringing at the edges), the curvature of the lens profile from flat to spherical dome, the inner specular glow, and the bright rim highlight. All have numeric defaults and can be changed through props. The library also exposes a lower-level LiquidGlassEngine class for use without React, plus a setPosition method available through a ref that lets you move the lens every frame without triggering a React re-render. This is useful for animation driven by external state. The package has no dependencies, bundles to about 5 kilobytes compressed, and is safe to use with server-side rendering frameworks like Next.js. Safari imposes a size limit on the content that SVG filters can process, so very large refracted regions may degrade on that browser. MIT licensed.
A React component that renders a draggable frosted-glass lens which visually bends the page content beneath it, working across Chrome, Safari, and Firefox.
Mainly TypeScript. The stack also includes React, TypeScript, SVG.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.