Static Mesh Gradient produces a high-quality mesh gradient from up to 10 color spots. Unlike the animated Mesh Gradient, the spot positions are determined by a seed value (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.
positions) rather than time, making it ideal for static art direction. Two independent sine-wave warp axes distort the mesh, and a mixing parameter controls whether colors blend softly or snap into hard stripes.
Usage
- React
- Vanilla JS
Props
Array of CSS color strings for each color spot. Accepts up to 10 colors.
Seed value that determines the placement of color spots. Range
0 to 100. Different seeds produce different spatial arrangements.Strength of sine wave distortion along the X axis. Range
0 to 1.Phase offset applied to the X-axis wave. Range
0 to 1.Strength of sine wave distortion along the Y axis. Range
0 to 1.Phase offset applied to the Y-axis wave. Range
0 to 1.Blending behavior between color spots.
0 produces hard stripes, 0.5 is smooth, 1 gives the most gradual blend. Range 0 to 1.Strength of grain distortion applied to color spot edges. Range
0 to 1.Post-processing black/white film grain overlay blended on top of the final color. Range
0 to 1.Animation speed multiplier. The default is
0 (static). Set to a non-zero value to animate the warp distortion over time.Starting animation frame in milliseconds. Useful for getting a deterministic first frame.
Presets
| Name | Description |
|---|---|
defaultPreset | Vibrant four-color palette with high waveX/waveY distortion and smooth mixing. |
sixtiesPreset | Earthy, desaturated palette with no mixing (hard stripes) and heavy grain. |
sunsetPreset | Warm teal-to-white sunset palette with moderate wave distortion. |
seaPreset | Deep blue ocean palette with asymmetric wave distortion. |
@paper-design/shaders-react:
Sizing props
Static Mesh Gradient also accepts allShaderSizingParams (fit, scale, rotation, offsetX, offsetY, originX, originY, worldWidth, worldHeight). See Sizing and fit for details.