- Docs
- Components
- Backgrounds
- Gradients & Fluids
- Stipple Gradient
A slow-folding gradient dithered into fine blue-noise stipple
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#5227FF", "#FF6B4A"] | Top-left and bottom-right colours. The top-right highlight and the deep corner are derived from them. |
backgroundColor | string | "#0A0A0A" | Page colour. The bottom-left corner melts into it, so the gradient fades into dark and light pages alike. |
drift | number | 32 | How far the two colours lean toward each other as the palette slowly breathes, in degrees of hue. 0 holds the palette still. |
speed | number | 1 | Speed of the flow and the colour breathing. |
warp | number | 1 | How far each fold pushes the gradient. 0 gives a clean four-corner blend. |
scale | number | 1 | Size of the folds. Higher values give broader, calmer shapes. |
layers | number | 10 | Number of stacked folds, each turned against the last. More layers give more intricate shapes. |
spread | number | 1 | How far the corner colours blend into each other. |
angle | number | 0 | Rotates the whole gradient, in degrees. 180 moves the deep corner to the top right. |
levels | number | 4 | Colour levels per channel. Fewer levels give a bolder stipple, more give a finer grain. |
pixelSize | number | 1 | Size of each stipple dot in CSS pixels. Larger dots also render faster. |
seed | number | 0 | Changes the shape of the folds, so several instances on a page differ. |
interactive | boolean | true | Moving the pointer stirs the flow, and a click sends a tide of the next colours outward. |
stir | number | 1 | How much pointer movement speeds up the flow. 0 turns it off. |
tide | number | 1 | Strength of the colour tide a click sends. 0 turns it off. |
intro | boolean | true | Colour develops out of the page through the stipple the first time the gradient comes into view. |
paused | boolean | false | Freezes the animation. |
quality | number | 1 | Resolution of the fold field, from 0.25 to 1. The stipple keeps its size. It also drops automatically on slow devices. |
ref | { replay, tide } | — | Replays the intro, or sends a colour tide from a point (0 to 1 on each axis). |
children | ReactNode | — | Content layered above the gradient. |
className | string | — | Classes for the root element. |
style | CSSProperties | — | Inline styles for the root element. |
colors[string, string]Top-left and bottom-right colours. The top-right highlight and the deep corner are derived from them.
["#5227FF", "#FF6B4A"]backgroundColorstringPage colour. The bottom-left corner melts into it, so the gradient fades into dark and light pages alike.
"#0A0A0A"driftnumberHow far the two colours lean toward each other as the palette slowly breathes, in degrees of hue. 0 holds the palette still.
32speednumberSpeed of the flow and the colour breathing.
1warpnumberHow far each fold pushes the gradient. 0 gives a clean four-corner blend.
1scalenumberSize of the folds. Higher values give broader, calmer shapes.
1layersnumberNumber of stacked folds, each turned against the last. More layers give more intricate shapes.
10spreadnumberHow far the corner colours blend into each other.
1anglenumberRotates the whole gradient, in degrees. 180 moves the deep corner to the top right.
0levelsnumberColour levels per channel. Fewer levels give a bolder stipple, more give a finer grain.
4pixelSizenumberSize of each stipple dot in CSS pixels. Larger dots also render faster.
1seednumberChanges the shape of the folds, so several instances on a page differ.
0interactivebooleanMoving the pointer stirs the flow, and a click sends a tide of the next colours outward.
truestirnumberHow much pointer movement speeds up the flow. 0 turns it off.
1tidenumberStrength of the colour tide a click sends. 0 turns it off.
1introbooleanColour develops out of the page through the stipple the first time the gradient comes into view.
truepausedbooleanFreezes the animation.
falsequalitynumberResolution of the fold field, from 0.25 to 1. The stipple keeps its size. It also drops automatically on slow devices.
1ref{ replay, tide }Replays the intro, or sends a colour tide from a point (0 to 1 on each axis).
—childrenReactNodeContent layered above the gradient.
—classNamestringClasses for the root element.
—styleCSSPropertiesInline styles for the root element.
—