OPUS/UI

Navigation

Liquid Chrome

Polished molten metal: a noise height-field reflecting a procedural studio environment with strip lights and Fresnel tint. The pointer drags a ripple; clicks drop a splash.

webglpointerclickreflection6 files · 632 locdeps: clsx, tailwind-merge

Installation

With the shadcn CLI, pointing at this platform’s registry:

npx shadcn@latest add https://opusui.131199999.xyz/r/liquid-chrome.json

Or offline, straight from your opus55 checkout (copies every file it needs):

node ../tailwind_component/opus55/scripts/add.mjs liquid-chrome

Usage

import { LiquidChrome } from "@/components/opus/backgrounds/liquid-chrome";

<LiquidChrome tint="#c7d2fe" className="absolute inset-0" />

API

PropTypeDefaultDescription
tintstring—Colour of the reflected lights.
shadowstring—Colour of the dark reflections.
scale / amplitudenumber1 / 1Wave frequency and height.
speednumber1Time multiplier. 0 freezes the animation; the pointer stays live.
interactivebooleantrueReact to the pointer (tracked on window, so overlaid content never blocks it).
classNamestring—Classes for the wrapper. Use `absolute inset-0` to fill a relative parent.
childrenReactNode—Optional content rendered above the canvas.

Notes

  • Renders with WebGL2 into a single full-screen triangle — no three.js, no textures, no dependencies.
  • Pauses automatically when scrolled off-screen or when the tab is hidden; resumes on return.
  • prefers-reduced-motion: reduce renders one still frame and ignores the pointer.
  • A CSS gradient fallback paints instantly and stays if WebGL2 is unavailable.

Command palette