Skip to main content
Clever Ops

Liquid Metal

A contained WebGL specimen cell (ogl) of raymarched liquid chrome: metaballs breathe and orbit, the pointer dents the surface, and the studio environment is derived live from theme tokens.

Preview & code

Loading Liquid Metal preview

Installation

pnpm dlx shadcn@latest add @cleverui/liquid-metal

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { LiquidMetal } from '@/components/ui/liquid-metal'
Exampletsx
import { LiquidMetal } from '@/components/ui/liquid-metal'

export default function LiquidMetalDemo() {
  return (
    <section className="bg-background py-16 sm:py-24">
      <div className="mx-auto max-w-6xl px-4 sm:px-6">
        <div className="grid items-center gap-10 sm:gap-14 lg:grid-cols-2">
          <div>
            <p className="font-mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground sm:text-xs">
              Crucible Systems · Rheology bench
            </p>
            <h2 className="mt-4 max-w-xl text-3xl font-semibold tracking-tight text-balance text-foreground sm:text-4xl">
              Watch the alloy make up its mind.
            </h2>
            <p className="mt-4 max-w-md text-sm leading-relaxed text-muted-foreground sm:text-base">
              Every pour begins as a guess about viscosity, surface tension and
              cooling rate. The bench measures all three in situ, so the
              behaviour of a melt is on record before a single mould is cut.
            </p>
            <p className="mt-4 max-w-md text-sm leading-relaxed text-muted-foreground sm:text-base">
              Each specimen is characterised against four decades of foundry
              data, then replayed at working temperature in the cell beside you.
              Drag across the surface and feel the metal push back.
            </p>
          </div>
          <LiquidMetal className="mx-auto" caption="ALLOY LM-05 · LIVE SPECIMEN" />
        </div>
      </div>
    </section>
  )
}

API reference

LiquidMetal accepts the following props.

PropTypeDefaultDescription
sizenumber440target square edge in px; the widget shrinks responsively below it (default 440, clamped 280-560)
blobCountnumber5metaballs in the cluster, clamped 3-6 (default 5)
speednumber1breathing and orbit tempo multiplier, clamped 0.25-2.5 (default 1)
captionstring | null'ALLOY LM-05 · η 17.4 PA·S'mono micro-label under the widget; pass null to hide (default 'ALLOY LM-05 · η 17.4 PA·S')
labelstring'Liquid metal specimen: chrome-like blobs slowly orbit and merge; on a fine pointer the surface dents under the cursor.'accessible description of the scene (default describes the specimen and its motion)

…plus everything from React.HTMLAttributes<HTMLElement>: className, event handlers, aria attributes and the rest pass straight through.

Frequently asked questions

How do I install the Liquid Metal component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/liquid-metal`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Liquid Metal require?

Liquid Metal uses motion and ogl on top of React and Tailwind CSS. You don't need to install them manually, the shadcn CLI resolves and installs npm dependencies automatically when you add the component.

Can I theme Liquid Metal to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services