whatisgithub

What is liquid-glass-web-react?

pallavag/liquid-glass-web-react — explained in plain English

Analysis updated 2026-05-18

25TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A React component that renders a draggable frosted-glass lens which visually bends the page content beneath it, working across Chrome, Safari, and Firefox.

Mindmap

mindmap
  root((liquid-glass-web-react))
    What it does
      Glass lens overlay
      Bends live pixels
      Cross-browser SVG effect
    Tech stack
      React
      TypeScript
      SVG displacement map
    Controls
      Refraction strength
      Chromatic aberration
      Lens curvature
      Rim highlight
    Use cases
      Glass UI panels
      Animated cursor lens
      Next.js SSR pages
    Audience
      Frontend developers
      Designers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Wrap a navbar or card in the lens component to add an Apple-style liquid glass effect.

USE CASE 2

Build a draggable glass magnifier that distorts content underneath as the user moves it.

USE CASE 3

Use the LiquidGlassEngine class directly in a non-React app for the same glass effect.

What is it built with?

ReactTypeScriptSVG

How does it compare?

pallavag/liquid-glass-web-reactcuzteam/cpaprogamekohl/frame-ui
Stars252525
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Safari limits the size of content SVG filters can process, so very large lens regions may degrade there.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

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.

Copy-paste prompts

Prompt 1
Install liquid-glass-web-react and wrap my navigation bar in the glass lens component with a subtle refraction setting.
Prompt 2
Show me how to use the LiquidGlassEngine class outside of React to add a glass effect to a vanilla JS page.
Prompt 3
Add a draggable liquid-glass-web-react lens over my hero image and tune the chromatic aberration prop.
Prompt 4
Use the ref-based setPosition method from liquid-glass-web-react to animate the lens without causing React re-renders.

Frequently asked questions

What is liquid-glass-web-react?

A React component that renders a draggable frosted-glass lens which visually bends the page content beneath it, working across Chrome, Safari, and Firefox.

What language is liquid-glass-web-react written in?

Mainly TypeScript. The stack also includes React, TypeScript, SVG.

What license does liquid-glass-web-react use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is liquid-glass-web-react to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is liquid-glass-web-react for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.