Search documentation

Find a vivid-layer page or product.

Grain Gradient

An animated, grain-textured gradient with seven configurable abstract shapes.

pnpm dlx shadcn@latest add @vivid-layer/grain-gradient

Customize

Softness
0.5
Intensity
0.5
Noise
0.25
Speed
1
Scale
1
Rotation
0
Offset X
0
Offset Y
0

API reference

The wrapper adds playback and accessible runtime defaults while preserving the complete Paper GrainGradient API. This includes frame, scale, rotation, offsets, fit controls, pixel-ratio controls, styles, and every shader-specific prop. See the Paper Grain Gradient reference for the full upstream prop table and accepted ranges.

PropTypeDefaultDescription
playback"auto" | "always" | "paused""auto"Controls motion policy. Auto pauses for reduced motion and while the shader is outside the viewport; paused fixes the effective speed at zero.
colorsstring[]["#ff6b35", "#f7c948", "#ff8fab", "#7c3aed"]Supplies up to seven gradient colors. The wrapper provides a warm curated palette when omitted.
colorBackstring"#1e0c0a"Sets the background color behind the animated bands.
shape"wave" | "dots" | "truchet" | "corners" | "ripple" | "blob" | "sphere""blob"Selects the generated abstract form.
softnessnumber0.7Controls the sharpness of transitions between color bands from 0 to 1.
intensitynumber0.35Controls distortion between color bands from 0 to 1.
noisenumber0.45Controls the grain overlay from 0 to 1.
speednumber0.18Sets the base animation rate. Playback can resolve the effective speed to zero without changing this value.
scalenumber1.15Sets the default zoom level while remaining fully overridable through the Paper API.
width / heightnumber | string"100%"Sets the canvas CSS dimensions. Size the parent element to establish the visible area.
maxPixelCountnumber2073600Caps the rendered pixel budget. Override only after measuring the target devices.

Credits

The rendering engine is Paper Shaders, distributed under the Apache License 2.0. vivid-layer supplies the React adapter, defaults, playback policy, documentation, and Registry packaging; it does not vendor or modify Paper's shader source.