Sora UI

Liquid Metal Background

Full-bleed liquid chrome surface powered by a WebGL2 fragment shader, configured entirely through typed props.

Made by Axyl
Loading...

Liquid chrome surface with live shader parameters.

Installation

npx shadcn@latest add @soralabs/liquid-metal-background

File Structure

liquid-metal-background.tsx
defs.ts
runtime.ts
shaders.ts

Usage

The component renders a decorative canvas behind its children. There are no data-* attributes to configure: every shader parameter is a prop, and the canvas is created and disposed with the component lifecycle. When WebGL2 is unavailable it falls back to a static CSS gradient, and reduced-motion users receive a single static frame.

For the same chrome applied to an interactive control, see Liquid Metal Button.

Props

PropTypeDefault
repetition?
number
2.2
softness?
number
0.14
distortion?
number
0.09
contour?
number
0.6
angle?
number
70
shiftRed?
number
0.35
shiftBlue?
number
0.35
scale?
number
1
colorBack?
string
"#ffffffff"
colorTint?
string
"#ffffffff"
speed?
number
1
className?
string
-
ref?
Ref<HTMLDivElement>
-

Credits

Inspired by Adam Perlis. Reimplemented for React and WebGL2.

Built by Axyl. A motion-first component registry for React.

Last updated: 12/1/2026

On this page

Help keep SoraLabs moving.

Every contribution helps us build and maintain open-source tools for the community.

Sponsor on GitHub