Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Liquid Glass

An interactive demo of an iOS 26–style Liquid Glass effect for the web.

Live Demo

Try it out → liquid-glass-eta.vercel.app

Screenshot 2026-03-02 at 08 49 33 Screenshot 2026-03-02 at 08 49 20 Screenshot 2026-03-02 at 08 50 23 Screenshot 2026-03-02 at 08 50 47 Screenshot 2026-03-02 at 08 51 59

Two Rendering Engines

SVG Version (index.html)WebGL Version (webgl.html)
How it worksSVG feDisplacementMap + backdrop-filterThree.js full-screen shader
RefractionPhysics-based displacement map with configurable IORReal-time GLSL ray refraction
Browser supportChrome / Chromium onlyAll modern browsers
ControlsGlass shape, refraction, appearance, inner/outer shadow, tintGlass shape, refraction, blur, specular, tint, shadow

Switch between them with the button at the bottom of the page

Features

  • Physics-Based Refraction — configurable glass thickness, bezel width, and index of refraction (IOR)
  • Specular Highlights — adjustable opacity and saturation for realistic light reflections
  • Inner & Outer Shadow — color, blur, and spread controls
  • Glass Tint — any RGB tint with opacity control
  • Background Picker — choose from preset template images or paste a custom URL
  • Draggable Glass — click and drag the glass pane anywhere on screen
  • Responsive — desktop and mobile layouts

Usage

  1. Clone the repo and open index.html in a browser, or visit the Live Demo.
  2. Use the control panel on the left to tweak every parameter in real time.
  3. Pick a background from the thumbnail grid or paste your own image URL.
  4. Drag the glass pane around to see refraction against different parts of the background.
  5. Hit Switch to WebGL version at the bottom if you're not on Chromium.

Browser Support

BrowserSVG VersionWebGL Version
Chrome / Edge / Chromium
Firefox
Safari

Inspiration

Inspired by Apple's iOS 26 Liquid Glass design language. Thanks to chakachuk's CodePen demo for the original glass-distortion filter setup that kicked this off.


关于 About

An interactive demo of an iOS 26 style Liquid Glass effect for the web
demoios26-liquid-glassliquidglasssvg-filterswebgl

语言 Languages

HTML74.2%
CSS15.2%
JavaScript10.6%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
15
Total Commits
峰值: 12次/周
Less
More

核心贡献者 Contributors