Warp

Installation

npm i @paper-design/shaders-react

Code

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

<Warp
  style={{ height: 500 }}
  proportion={0.45}
  softness={1}
  distortion={0.25}
  swirl={0.8}
  swirlIterations={10}
  shape="checks"
  shapeScale={0.1}
  scale={1}
  rotation={0}
  speed={1}
  colors={["#cc3333","#cc9933","#99cc33","#33cc33"]}
/>

Props

NameDescriptionTypeValues
colorsUp to 10 colors in the gradientstring[]Hex, RGB, or HSL color
proportionBlend point between 2 colors (0.5 = equal distribution)number0 to 1
softnessColor transition sharpness (0 = hard edge, 1 = smooth gradient)number0 to 1
distortionStrength of noise-based distortionnumber0 to 1
swirlStrength of the swirl distortionnumber0 to 1
swirlIterationsNumber of layered swirl passes (effective with swirl > 0)number0 to 20
shapeBase pattern typeenum
| "checks" | "stripes" | "edge"
shapeScaleZoom level of the base patternnumber0 to 1
scaleOverall zoom level of the graphicsnumber0.01 to 5
rotationOverall rotation angle of the graphicsnumber0 to 360
speedAnimation speednumber0 to 20

Description

Animated color fields warped by noise and swirls, applied over base patterns (checks, stripes, or split edge). Blends up to 10 colors with adjustable distribution, softness, distortion, and swirl. Great for fluid, smoky, or marbled effects