Mesh Gradient renders up to 10 color spots that glide along independent trajectories. Organic noise distortion and a vortex swirl warp their positions, while two grain controls let you add texture to color edges or apply a classic film-grain overlay.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.
Usage
- React
- Vanilla JS
Props
Array of CSS color strings for each color spot. Accepts up to 10 colors. Supports any valid CSS color format including hex with alpha (e.g.
#ff000080).Power of organic noise distortion applied to color spot positions. Range
0 to 1, where 0 means no distortion and 1 is maximum.Power of vortex (swirl) distortion. 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. Set to
0 to pause. Negative values play the animation in reverse.Starting animation frame in milliseconds. Useful for getting a deterministic first frame.
Presets
| Name | Description |
|---|---|
defaultPreset | Four-color palette (blue, indigo, pink, purple) with moderate distortion. |
inkPreset | High-contrast black-and-white with heavy distortion and 90° rotation. |
purplePreset | Two-color deep purple scheme with maximum swirl. |
beachPreset | Slow-moving aqua and gold palette. |
@paper-design/shaders-react:
Sizing props
Mesh Gradient also accepts allShaderSizingParams (fit, scale, rotation, offsetX, offsetY, originX, originY, worldWidth, worldHeight). See Sizing and fit for details.