Toggle Sidebar B
AppearanceLight & dark mode D

Ferrofluid

A churning magnetic fluid traced by glowing contour lines, with a cursor magnet.

Default

Colors, flow and the cursor magnet are wired to the controls underneath. The fluid is drawn in a WebGL fragment shader.

Light previewReplay previewOpen in new tab
New Creative Components

Bend the magnetic fluid

Get started Learn more

Customize

Color 1
Color 2
Color 3
Flow Direction
Speed0.5
Scale1.6
Turbulence1
Fluidity0.1
Rim Width0.2
Sharpness2.5
Shimmer1.5
Glow2
Cursor Strength1
Cursor Radius0.35

API Reference

Ferrofluid

PropTypeDefaultDescription
colorsstring[]['#4F46E5', '#06B6D4', '#E0F2FE']Array of hex colors (up to 8) used to tint the fluid rim. Colors are spread across the surface by height; a single color makes the whole effect uniform.
speednumber0.5Multiplier for how fast the fluid churns and flows.
scalenumber1.6Overall feature size. Higher values zoom in for larger, fewer blobs.
turbulencenumber1Amount of domain distortion. Higher values create more chaotic, swirling motion.
fluiditynumber0.1Smoothness of the merge between the two fluid layers. Higher = softer, more liquid blending.
rimWidthnumber0.2Thickness of the glowing contour lines tracing the fluid surface.
sharpnessnumber2.5Contrast of the rim highlights. Higher values give crisper, thinner edges.
shimmernumber1.5Amount of fine grainy break-up applied to the rim. 0 = smooth lines.
glownumber2Overall brightness multiplier of the rim highlights.
flowDirection'up' | 'down' | 'left' | 'right''down'Primary direction the fluid surface drifts.
opacitynumber1Overall alpha of the rendered canvas.
mouseInteractionbooleantrueEnables a magnetic spike that rises and glows under the cursor.
mouseStrengthnumber1Intensity of the magnetic cursor spike.
mouseRadiusnumber0.35Falloff radius of the magnetic cursor spike.
mouseDampeningnumber0.15Easing time constant (seconds) for the cursor to follow the pointer. 0 = immediate.
mixBlendModestringundefinedCSS mix-blend-mode applied to the canvas (e.g. 'screen', 'lighten').
pausedbooleanfalseIf true, stops rendering updates (freezing the current frame).
dprnumberwindow.devicePixelRatioOverrides device pixel ratio; lower for performance, higher for sharpness.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • Purely decorative canvas. Place it behind content with enough contrast.