Grain Gradient combines a multi-color gradient with a choice of 7 animated shape types — wave, dots, truchet, corners, ripple, blob, and sphere. Each shape animates continuously and is distorted by fractal noise. AnDocumentation 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.
intensity parameter controls how much the noise warps the color bands, while a noise parameter adds a raw grainy overlay.
Grain is calculated using screen-space coordinates (
gl_FragCoord), meaning the grain texture does not scale or rotate with the shader’s sizing parameters.Usage
- React
- Vanilla JS
Props
Background color shown behind the gradient shape. Accepts any CSS color string.
Array of CSS color strings. Accepts up to 7 colors, blended through the chosen shape.
The animated shape form used to drive the gradient. Each shape animates differently.
wave— animated sine wavedots— grid of orbiting dotstruchet— randomized arc tile patterncorners— opposing corner blobsripple— concentric ripple ringsblob— organic moving blobsphere— lit 3D sphere with moving light source
Sharpness of transitions between color bands.
0 gives hard edges; 1 gives a smooth gradient. Range 0 to 1.How strongly fractal noise distorts the boundaries between color bands. Range
0 to 1.Strength of the raw grainy noise overlay applied on top of the gradient. Range
0 to 1.Animation speed multiplier. Set to
0 to pause.Starting animation frame in milliseconds.
Presets
| Name | Description |
|---|---|
defaultPreset | Four-color purple/blue palette on black using the corners shape. |
wavePreset | Three-color warm earthy palette on near-black using the wave shape. |
dotsPreset | Four-color vibrant palette using the dots shape at 0.6× scale. |
truchetPreset | Three-color palette with maximum grain using the truchet shape. |
ripplePreset | Three-color palette using the ripple shape at 0.5× scale. |
blobPreset | Three-color muted palette using the blob shape. |
@paper-design/shaders-react:
Sizing props
Grain Gradient also accepts allShaderSizingParams (fit, scale, rotation, offsetX, offsetY, originX, originY, worldWidth, worldHeight). See Sizing and fit for details.