Skip to main content

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.

Animated color fields warped by layered value noise and iterative swirl distortion, applied over a base geometric pattern. The base pattern can be checks, stripes, or a split-edge gradient. Up to 10 colors blend across the result with adjustable distribution, softness, distortion strength, and swirl intensity. Great for fluid, smoky, or marbled effects.

Usage

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

export default function Example() {
  return (
    <Warp
      colors={['#121212', '#9470ff', '#121212', '#8838ff']}
      proportion={0.45}
      softness={1}
      shape="checks"
      shapeScale={0.1}
      distortion={0.25}
      swirl={0.8}
      swirlIterations={10}
      speed={1}
      style={{ width: '100%', height: '100%' }}
    />
  );
}

Props

colors
string[]
Array of up to 10 colors blended across the warped field.
proportion
number
default:"0.45"
Blend point between colors. 0.5 = equal distribution. Range: 0 to 1.
softness
number
default:"1"
Color transition sharpness. 0 = hard edge, 1 = fully smooth gradient. Range: 0 to 1.
shape
string
default:"\"checks\""
Base pattern type. One of "checks", "stripes", or "edge".
shapeScale
number
default:"0.1"
Zoom level of the base pattern. Range: 0 to 1.
distortion
number
default:"0.25"
Strength of noise-based distortion. Range: 0 to 1.
swirl
number
default:"0.8"
Strength of the iterative swirl distortion. Range: 0 to 1.
swirlIterations
number
default:"10"
Number of layered swirl passes. Higher values produce more complex swirls. Range: 0 to 20.
speed
number
default:"1"
Animation speed multiplier. Set to 0 to pause.
frame
number
default:"0"
Static frame position when speed is 0.

Pattern options

The WarpPatterns enum provides the available base pattern values:
KeyValueDescription
checks0Sine-wave checkerboard pattern
stripes1Horizontal stripe pattern
edge2Split-edge gradient

Presets

NameDescription
DefaultDark purple warp on checks
Cauldron PotGreen and blue bubbling warp
Live InkBlack ink flow on light background
KelpGreen stripe-based kelp motion
NectarWarm caramel edge-based flow
PassionDeep red spiral on checks

Sizing

This shader uses ShaderSizingParams. See Sizing and fit for fit, scale, rotation, offsetX, offsetY, originX, originY, worldWidth, and worldHeight props.