Overview
True metaball merging via SVG primitives (real <circle> + <ellipse> elements) that travel on independent orbits and visually fuse into one shape via the gooey blur + colorMatrix threshold filter. Three orbit programs ship: anchor + dual drifters, binary dance, and a single quiet satellite.
When to use it
Reach for metaball when you need genuine fluid merging between primitives (loading dots that absorb into each other, droplets coalescing, navigation indicators that morph between states). Skip it for static-content decoration; the constant motion in peripheral vision is exhausting outside the active focus area.
How it works
Real SVG <circle> and <ellipse> primitives travel independently via CSS or SMIL transform animations. The parent <g> applies a two-stage filter via filter="url(#gooey)": <feGaussianBlur stdDeviation="10" /> blurs the primitives into soft clouds; then <feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7" /> applies a threshold to the alpha channel — alpha values above the threshold snap to opaque, below snap to transparent. The result is soft clouds that merge wherever their blurred edges overlap.
Production gotchas
The gooey filter region must extend past the visible bounds of the primitives or the blur clips at the edges and the merge looks abrupt. Set filter with explicit x="-50%" y="-50%" width="200%" height="200%" on the filter definition. The colorMatrix threshold values (18, -7) are tuned for stdDeviation="10"; adjust both together. Safari iOS occasionally exhibits banding at the threshold edge — raise the blur slightly to smooth it. Each animated primitive triggers a filter re-rasterization, so keep the count under ~6 for smooth playback.
Accessibility
The merging blobs are decorative — mark the wrapping SVG with role="presentation" or aria-hidden="true". Under prefers-reduced-motion: reduce stop the primitive orbits and pin them at rest positions so the merge becomes static. Verify the filtered output maintains sufficient contrast against the background; the threshold operation can produce edges that flicker between high and low contrast as primitives drift.
References
Implementation depth
Metaballs need enough independent motion to prove they are separate primitives, then enough blur overlap to merge visually. The SVG circles remain simple; the filter creates the fluid surface.
Filter bounds and primitive count decide performance. Expand the filter region so blur is not clipped, keep the animated circle count modest, and freeze orbits under reduced motion instead of removing the composed shape.