Metaballs
Drift soft blobs that merge and separate like liquid, with an optional ball that follows the pointer.
Overview
Metaballs draws a handful of round blobs that wander slowly and melt into one another when they meet, then pull apart again. Each ball takes a color from colors in turn, and where two merge their colors blend over a short distance instead of averaging into mud. With followPointer, one more ball tracks the pointer and merges with the rest, which makes an empty state, a sign-in panel, or a loading screen feel responsive without demanding attention.
Use a small count and low spread for a compact cluster behind a logo, or more balls across the full container for a background. Set softness above 0 for a blurred glow instead of crisp edges, and backgroundColor="transparent" to place the blobs over your own surface.
Installation
Usage
import { Metaballs } from "honestui/shaders"
<div className="h-80 bg-neutral-950">
<Metaballs
className="size-full"
colors={["#6366f1", "#ec4899"]}
count={8}
/>
</div>Accessibility
Metaballs is decorative: the canvas is hidden from assistive technology, and text or actions belong in normal HTML above it. The pointer ball is an enhancement only, so nothing should depend on it, and it does nothing for keyboard or touch users. Animation pauses while the effect is offscreen, while the document is hidden, and when the user prefers reduced motion; a still frame is rendered, and the pointer ball still follows the pointer without easing. Use paused for your own control, and give the container a background for when WebGL is unavailable.