Liquid Metal

Installation

npm i @paper-design/shaders-react

Code

import { LiquidMetal } from '@paper-design/shaders-react';

<LiquidMetal
  style={{ height: 500 }}
  colorBack="#000000"
  colorTint="#ffffff"
  repetition={4}
  softness={0.3}
  shiftRed={0.3}
  shiftBlue={0.3}
  distortion={0.1}
  contour={1}
  shape="circle"
  offsetX={0}
  offsetY={0}
  scale={0.6}
  rotation={0}
  speed={1}
/>

Props

NameDescriptionTypeValues
colorBackBackground colorstringHex, RGB, or HSL color
colorTintOverlay colorstringHex, RGB, or HSL color
repetitionDensity of pattern stripesnumber1 to 10
softnessColor transition sharpness (0 = hard edge, 1 = smooth gradient)number0 to 1
shiftRedR-channel dispersionnumber-1 to 1
shiftBlueB-channel dispersionnumber-1 to 1
distortionNoise distortion over the stripes patternnumber0 to 1
contourStrength of the distortion on the shape edgesnumber0 to 1
shapeShape typeenum
| "none" | "circle" | "daisy" | "metaballs"
offsetXHorizontal offset of the graphics centernumber-1 to 1
offsetYVertical offset of the graphics centernumber-1 to 1
scaleOverall zoom level of the graphicsnumber0.01 to 4
rotationOverall rotation angle of the graphicsnumber0 to 360
speedAnimation speednumber0 to 4

Description

Futuristic liquid metal material applied to abstract forms, simulating dynamic surface distortion