06.24 · 3D & Advanced
Liquid Glass
Drag a glass panel and the picture behind it bends at the edges. Best for cards.
Drag it
Drag the glass or tap where it should go, use the arrow keys, or press Show me. Frosted here: the bend shows in Chrome or Edge on a computer or Android.
Inside, a bend map steers the glass (left half: red sideways, green up and down); each arrow points to what its spot shows, so the rim magnifies most.
Plain glass tints the picture without bending it; Liquid glass also reads the picture from further in near its rim, so its edge bends and magnifies. Drag Liquid glass or press Show me.
Try it
Change a setting and look at the glass, then drag it or press Show me.
How much it bends
How far the rounded edge pulls in the picture behind it.
Frost
How much the glass blurs what is behind it.
Tint
The color the glass adds.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a liquid glass panel to [the card or menu you want to float over a picture]. The panel shows what is behind it bent and magnified near its rounded edges, like thick curved glass, with a soft highlight along the rim. Bend it with an SVG displacement filter applied to what is behind the panel, which Chromium browsers support; other browsers get blurred, tinted glass with the same highlight. Dragging with the pointer or a finger moves it, and so do the arrow keys; it stretches a little as it moves and wobbles back when it stops. Use transforms only, so it stays smooth. If the visitor has reduced motion turned on, let it jump instead of gliding, with no stretch or wobble. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.