Liquid Metal applies a fluid animated chrome-like material over an uploaded logo or one of several built-in abstract shapes. Animated stripes are distorted along the shape edges to create the illusion of reflective liquid metal in motion.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/paper-design/shaders/llms.txt
Use this file to discover all available pages before exploring further.
When using a custom image, this shader requires a preprocessing step. The
toProcessedLiquidMetal helper encodes edge gradient data needed by the GPU. The React component handles this automatically. In vanilla JS, call toProcessedLiquidMetal yourself and pass the result as u_image.Usage
- React
- Vanilla JS
toProcessedLiquidMetal internally and re-runs it whenever image changes. Use suspendWhenProcessingImage to integrate with React Suspense:image and set shape:Props
Optional logo or shape image. In React, pass a URL string. In vanilla JS, pass the pre-processed
HTMLImageElement returned by toProcessedLiquidMetal. When omitted, the shape prop selects a built-in abstract shape.Built-in shape used when no
image is provided. Use the LiquidMetalShapes enum (vanilla JS) or string literal (React).| Value | Description |
|---|---|
none | Full canvas fill |
circle | Circle |
daisy | Organic daisy/flower |
diamond | Diamond |
metaballs | Animated metaballs |
Animation playback speed multiplier.
Background color shown outside the shape.
Overlay tint color blended into the metal using a color-burn blend mode.
Density of pattern stripes. Range:
1 to 10.Color transition sharpness.
0 = hard edge, 1 = smooth gradient.Noise distortion applied over the stripe pattern. Range:
0 to 1.Strength of distortion at the shape edges. Range:
0 to 1.Red channel dispersion (chromatic aberration). Range:
-1 to 1.Blue channel dispersion (chromatic aberration). Range:
-1 to 1.Direction of pattern animation in degrees. Range:
0 to 360.React only. When
true, the component suspends while toProcessedLiquidMetal is running. Wrap in a <Suspense> boundary to provide a fallback.Presets
The following presets are exported from@paper-design/shaders-react:
| Export | Name | Description |
|---|---|---|
defaultPreset | Default | Silver diamond with red/blue shift |
noirPreset | Noir | Black background, no chromatic shift |
fullScreenPreset | Backdrop | Full-canvas fill mode |
stripesPreset | Stripes | High-repetition color-tinted stripes on circle |
toProcessedLiquidMetal helper
toProcessedLiquidMetal performs a CPU-side Poisson solve to generate the edge gradient texture the shader requires:
pngBlob encodes:
- R channel — edge gradient (Poisson solution)
- G channel — original image alpha
pngBlob as an object URL loaded into an HTMLImageElement, or use the React component which handles this automatically.
Enums
ImportLiquidMetalShapes from @paper-design/shaders when using the vanilla JS API: