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.

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.

More optionsFewer options

Shape

A pill suits a menu bar; a circle works like a lens.

The picture that steers the bend: red moves it sideways, green up and down.

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.

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 GitHub

What it is

The full explanation is in README.md.

Good for

  • Floating menus
  • Cards over photos
  • Tab bars
  • Media controls

Avoid on

  • Long text
  • Plain backgrounds