Skip to content

Ferrofluid Spike Field

A black magnetic liquid seen across its surface, with a magnet under it that follows the pointer. The liquid heaves into a mound and erupts into a hexagonal bed of needle spikes that lean toward the magnet and sink back in its wake; a press surges it and sends a ring of spikes across the pool.

WebGL20 deps1 file · 32 KB TSXreduced-motion aware

Prominimal
Preview

Props

1
1
1
0.6
1
1
0.85
Idle magnet
Presence
Show sample copy

The source is part of Pro

$27/month or $179 once. See Pro

No runtime dependencies
"use client";

import { useEffect, useRef } from "react";
import type { CSSProperties, ReactNode } from "react";

/**
 * FerrofluidSpikeField: a black magnetic liquid seen across its surface, with
 * a magnet under it that follows the pointer. Where the field is strong the
 * surface heaves into a mound and erupts into a hexagonal bed of needle
 * spikes; they lean toward the magnet as it moves, and sink back slowly in
 * its wake. A press surges the magnet: the spikes stand taller and a ring of
 * them erupts outward across the pool.
 *
 * THE PHYSICS, LOOSELY. A real ferrofluid stays flat until the field crosses
 * a critical strength (the Rosensweig instability), then forms a hexagonal
 * lattice of spikes whose height grows like sqrt(1 - Bc / B). That is what
 * runs here: a small field grid on the CPU (rising fast, falling slowly, so
 * spikes linger), a triangular lattice of concave needle profiles whose

  // ---------------------------------------------------------------
  // Full source available with a viberdy Pro subscription.
  // https://viberdy.dev/pricing
  // ---------------------------------------------------------------
}
Details

About this background

A pool of black magnetic liquid, seen low across its surface, with a magnet hidden under it that follows your pointer. Real ferrofluid stays flat until the field passes a critical strength, then snaps into a hexagonal lattice of spikes whose height grows with the field. That is what this does. A small field grid rises quickly and falls slowly, so spikes stand in the magnet's wake for a moment after it has gone. Every lattice cell grows a needle with a sharp tip and concave flanks, sized by the field at its base, and every needle leans toward the magnet as it moves. Under the strongest field the whole surface heaves into a mound. Pressing surges the magnet: the spikes stand taller and a ring of them erupts outward across the pool and lies back down. The liquid itself has no colour. What you see is the studio it reflects: a softbox on the tips, a white hairline down one side, and one long strip of your accent colour behind the pool that draws every rim.

Curator’s note

Both of the house design scouts ranked a ferrofluid first: the most direct link between a hand and a reaction we could find. This one is raymarched from a low camera so the spikes stand up as silhouettes, and it is lit only by the studio it reflects.

Pairs well with

Pro

Ink Aura Field

backgrounds
Pro
Pro