Backgrounds

Quicksilver

Molten chrome. Every other shader background emits light; this one reflects a studio that does not exist, synthesised from the surface normal — sharp softbox edges, a conductor's Fresnel wash, thin-film iridescence, and a wake that keeps moving where you dragged.

Install

bun add ogl

Then copy 2 files into your project:

  • components/registry/quicksilver/quicksilver.tsx
  • hooks/use-animation-loop.ts

Props

PropTypeDefaultDescription
flowSpeednumber0.35How fast the surface churns. At zero the metal sets, and a still frame is the only honest way to see how much of what you are looking at is the height field and how much is the light sitting on it.
warpnumber0.55How far the noise drags its own coordinates before it is sampled again. Low is rolled sheet metal; past about one the surface folds back through itself and stops reading as a liquid at all.
stirnumber1How hard the pointer drags the metal. Eight recent impulses are kept alive at once, each with its own direction and age, which is why this leaves a wake rather than a dent — and why the whole component still costs one pass and no render target.
viscositynumber0.6How long a stir survives after the pointer has left. Low is mercury and settles almost before you have finished the gesture; high holds the wake long enough that you can write in it.
fresnelnumber2.2Schlick exponent on the rim response. Low mirrors the whole surface evenly and reads as painted plastic; high keeps the bright reflection at the grazing angles, which is where metal actually puts it.
iridescencenumber0.45Thin-film interference over the reflection, and the whole difference between chrome and oil on water. The hue comes from the film's optical thickness over the viewing cosine, so it tracks the surface angle instead of being a rainbow painted across the panel.
roughnessnumber0.18How soft the reflected studio edges are. This is not a blur: a rough conductor reflects the same room over a wider cone, so what widens is the light-to-dark transition. Zero is a mirror and shows every artefact in the height field, and a little roughness is what lets procedural metal survive being looked at closely.
tintstring (hex)"#c8d2e0"The base metal. Conductors tint what they reflect, and this washes out toward white at the grazing angles rather than staying constant — which is the part most fake chrome gets wrong.
sheenColorstring (hex)"#a855f7"The colour carried by the grazing-angle sheen.
backgroundColorstring (hex)"#05060a"The floor of the reflected environment, and what the vignette falls away to — so the panel edge reads as the room ending rather than as a mask laid over it.

What It Demonstrates

Loop
An animation that repeats, a set number of times or infinitely.
Idle animation
Subtle motion that plays while an element is just sitting there, waiting to be interacted with.
Hover effect
Visual change when the cursor moves over an element.
Compositing
Letting the GPU move or fade an element on its own layer without redoing layout or paint.
Hardware acceleration
Animating transform and opacity lets the GPU keep motion smooth.

Related Components

Appears In