DEV Community

Cover image for Liquid Glass: Apple-Style Refraction for Any Element
jQueryScript
jQueryScript

Posted on

Liquid Glass: Apple-Style Refraction for Any Element

liquid-glass: a JavaScript library that renders real SVG-based refraction on any DOM element, no dependencies required.

Key features:

  • Bends backdrop content at a panel's rim with a faint prism fringe in Chromium browsers.
  • Falls back to a frosted blur automatically on Safari and Firefox.
  • Keeps interior text and form inputs fully usable, since it works through backdrop-filter.
  • Regenerates its displacement map automatically on resize.
  • Ships as one file with a small refresh/destroy API for framework cleanup.

Useful for dashboards, modals, and nav bars that want an Apple-style liquid glass look without a WebGL dependency.

👉 Blog Post

👉 GitHub Repo

👉 Live Demo

Top comments (0)