HomeStylesTemplates
StyleKit
StylesTemplates

Liquid Glass Lab

Real refraction, not just blur.

An Apple-style liquid glass material built on SVG displacement filters. The surface bends, magnifies, and color-fringes whatever sits behind it — strongest at the rim, subtle at the center, like looking through a water droplet.

Drag the glass card around and watch straight lines bend at its rim.

Refraction bends what you read.

Glass is honest about light. It slows every wavelength by a different amount, so edges split into color and straight lines refuse to stay straight. This page exists to be distorted.

Liquid Glass

Drag me over the stripes

Rim bends, center stays calm.

Controls

Presets

How it works

01

Lens displacement map

A canvas renders the glass shape as a vector field: red encodes horizontal offset, green vertical, neutral gray means no shift. Magnitude ramps up near the border and fades to zero at the center — Spread controls the band, Depth the curvature.

02

Refraction with dispersion

feImage feeds that map into feDisplacementMap, which bends the backdrop through it three times — once per RGB channel at slightly different scales — and screen-blends the results. The mismatch paints rainbow fringes exactly where distortion peaks: the rim.

03

Liquid wobble and frost

feTurbulence adds a subtle organic ripple over the refracted image and feGaussianBlur frosts it. The whole chain runs as one CSS backdrop-filter: url(#filter), so the glass live-refracts anything that scrolls or moves behind it.

StyleKit

A curated web design style library to help AI generate better-looking websites.

GitHub Repository

Navigation

StylesColorsCollectionsTemplatesGuideBlogChangelog

Resources

UI Design PromptsLanding Page PromptsDashboard PromptsTailwind UI PromptsDark Mode UI Prompts

Stay Updated

By subscribing, you agree to our Privacy Policy and Terms.

FeedbackTell us what could work betterSupport MaintenanceIf StyleKit helps your workflow, voluntary support helps cover servers, domains, and ongoing upkeep.

(c) 2026 StyleKit. Open source project.

AboutContactPrivacyTermsBuilt with the Editorial style
StyleKit frontend style librarystylekit.top陕ICP备2025065501号-3