Tools

Liquid Glass for the web: real refraction with WebGL

TL;DR

Pure-CSS glassmorphism just blurs the background and looks flat. Liquid Glass libraries use WebGL shaders to simulate refraction and blur in real time, and apply to cards, circles and pills without writing shaders yourself.

How it differs from pure CSS

CSS backdrop-filterLiquid Glass (WebGL)
EffectBlurs the background, no distortionRefraction + blur; the background bends like real glass
ShapesFollows border-radiusCards, circles, pills… with custom masks
CostVery lightMore GPU work
ComplexityA few lines of CSSA few lines of JS; the library handles shaders

How to put it to work

  • Use sparingly: for hero elements (nav bar, featured card), not the whole page.
  • Fallback: keep a backdrop-filter version for low-end devices or browsers without WebGL.
  • Contrast: text on glass easily loses contrast — check for at least 4.5:1.