Liquid Metal
Pour a flowing chrome surface into the container or into a circle or rounded rectangle.
Overview
Liquid Metal renders a mirror-like surface that slowly flows, reflecting a simple studio of bright and dim light bands. Near the band edges a little color separates, the way light does through polished glass or mercury. Fill a whole container for a hero background, or set shape to pour the metal into a circle or rounded rectangle with a transparent outside: the reflections bend along the outline, so the shape reads as a solid, beveled object, which suits a product mark, an avatar ring, or an empty state.
Keep the default near-white colorTint for chrome, or tint it warm for gold and copper finishes. Fewer bands with more softness read as brushed metal; more bands with low softness read as polished chrome.
Installation
Usage
import { LiquidMetal } from "honestui/shaders"
<div className="h-80 bg-neutral-950">
<LiquidMetal className="size-full" shape="circle" shapeScale={0.7} />
</div>With shape="circle" or shape="rounded-rect", everything outside the shape is transparent, so the container's own background shows through.
Accessibility
Liquid Metal is decorative: the canvas is hidden from assistive technology, and any text or action belongs in normal HTML beside or above it. The bright bands move across the whole surface, so test the contrast of overlaid text across the full animation, not one frame. The effect pauses while it is offscreen, while the document is hidden, and when the user prefers reduced motion; a still frame is rendered instead. Use paused for your own control, and give the container a background that stands in when WebGL is unavailable.