06.14 · 3D & Advanced

Image Distortion on Hover

The picture ripples and bends around your pointer. Best for portfolio images.

Hover it

Move your pointer over the picture, drag a finger across it (or Tab to it and use the arrow keys), or press Show me.

Try it

Change a setting, then try it again or press Show me.

Effect

Rings, a bulge, a liquid swirl, or big square pixels.

Strength

How far the picture bends.

Size

How wide an area around the pointer bends.

More optionsFewer options

Fade-out speed

How fast the picture settles after the pointer leaves.

The rings keep moving outward.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add a hover distortion to [the image you want to react]. Draw the image with a WebGL shader and, in a circle around the pointer, read each pixel from a slightly shifted spot, so the picture seems to ripple, bulge, swirl like liquid or break into squares there while the image itself never changes. The bending fades out smoothly after the pointer leaves. On touch screens, dragging a finger across the image should do the same. If the visitor has reduced motion turned on, keep the image still. 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

  • Portfolio images
  • Gallery tiles
  • Hero images
  • Product photos

Avoid on

  • Small thumbnails
  • Images with text