Copied!
Guide

How the gooey effect works

Shapes that stretch and melt into each other like liquid are made with a blur and a contrast step in one small SVG filter. Here is the filter, what each number does, and why Safari sometimes refuses.

← Blog
Title card: The gooey effect. Preview of the Gooey text hover element from the Enrichr Library.

December 4, 2026

3 min readOne filter, two steps

The gooey effect makes separate shapes stretch and merge like drops of liquid. It is a two-step SVG filter: blur the shapes so that neighbours bleed into each other, then raise the contrast of the transparency so the soft bleed snaps back to a hard edge. Where two blurred shapes overlap, the edge now wraps around both.

Try it on any site. The free animation library checker shows you which animation libraries actually run on a page (GSAP, Lenis, Framer Motion). Paste a URL, no sign-up for your first lookup.

What is the filter?

<svg width="0" height="0" style="position:absolute" aria-hidden="true">
  <filter id="goo">
    <feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />
    <feColorMatrix in="blur" mode="matrix"
      values="1 0 0 0 0
              0 1 0 0 0
              0 0 1 0 0
              0 0 0 20 -8" result="goo" />
    <feComposite in="SourceGraphic" in2="goo" operator="atop" />
  </filter>
</svg>

<div class="blobs">
  <span></span><span></span>
</div>
.blobs { filter: url(#goo); }
.blobs span {
  display: inline-block; width: 80px; height: 80px; border-radius: 50%;
  background: #1db954;
  animation: drift 3s ease-in-out infinite alternate;
}
.blobs span + span { animation-direction: alternate-reverse; }
@keyframes drift { to { transform: translateX(70px); } }

What does each number do?

ValueWhat it controlsTry
stdDeviation="10"How far the shapes reach toward each other before they join.6 to 15
20 in the last rowHow hard the edge is after the blur. Higher is crisper.15 to 30
-8 in the last rowThe threshold. More negative makes the shapes thinner.-5 to -12

The first three rows of the matrix leave red, green and blue alone. Only the alpha row does any work.

What is the feComposite line for?

It draws the original, sharp graphic on top of the gooey shape. Without it, anything inside the shapes, such as an icon, is blurred and thresholded too. It is optional if your blobs are plain colour.

How do I use it with text or a menu?

Split the element in two layers. The bottom layer holds only the blobs and carries the filter. The top layer holds the text and has no filter. Move a blob behind the hovered word and it will stretch between words as it travels, while the letters stay sharp.

How heavy is it?

The browser has to redraw and re-filter the whole filtered element on every frame that something moves. A menu or a button is fine. A full-screen filtered layer will drop frames on phones. For many blobs or a large area, draw them on a canvas instead and threshold the pixels yourself, or use a WebGL shader.

Which finished examples can I copy?

ElementWhat it does
Gooey text hoverA menu of big words with a gooey blob that stretches and follows the pointer from row to row.
Gooey word switcherA word that melts into the next through an SVG goo filter, rotating on a timer.
Metaballs canvasLiquid metaballs drawn on a canvas by thresholding a distance field at low resolution.
Distorted link hoverLinks that ripple like heat haze on hover, using an animated SVG turbulence filter.

All are free in the Enrichr Library, with a live demo, copyable code and a pen on CodePen.

Where to go next

FAQ

What do the numbers in the gooey feColorMatrix mean?

The last row sets the new alpha. In 0 0 0 20 -8, the 20 multiplies the blurred alpha and the -8 subtracts a threshold. Soft edges below the threshold vanish, and everything above it becomes solid.

Why is my text blurry or broken inside a gooey container?

The filter applies to everything inside the element, text included. Thin letter strokes fall below the threshold and disappear. Put the text in a sibling layered on top, outside the filtered element.

Why does the gooey effect not work in Safari?

Safari can ignore an SVG filter whose <svg> is set to display: none. Hide the SVG with zero width and height and absolute positioning instead.

Is there a CSS-only gooey effect?

Yes: filter: blur(10px) contrast(20) on the parent, with a solid background. It only works on a flat background colour and shifts the colours, which is why the SVG filter is usually better.