Layered silk of flowing, billowing particles
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#FF9FFC", "#5227FF"] | The light colour and the deep colour. The silk shades from one to the other through the hues between them, and its highlights are mixed towards white. |
backgroundColor | string | "transparent" | Colour behind the silk. On light backgrounds the particles build up like soft ink, on dark ones they glow. With transparent it picks up the colour of the page. |
shape | "sweep" | "veil" | "dune" | "plume" | "loop" | "sweep" | The composition. Sweep layers broad sheets that flow across the frame, veil hangs them like curtains, dune stacks them into drifting ribbons, plume rises diagonally through the frame, and loop twists a single band into a ring. |
layers | number | 0 | Number of overlapping sheets. 0 uses the shape's own count. |
particles | number | 1 | Particle density. The count follows the size of the container, so 1 keeps the silk equally fine at any size. Lower values make it airier and lighter to render. |
strands | number | 14 | How much the particles line up into threads. Low values give an even grain, high values show fine silk threads. |
grainSize | number | 1.1 | Size of each particle in CSS pixels. |
fuzz | number | 0.3 | How loosely the threads are spun. The edges of each sheet always fray a little more than its middle. |
opacity | number | 1 | Opacity of each particle. Lower values make the silk more see-through. |
size | number | 1 | Scale of the composition. Sweep, veil, dune and plume run past the edges of the frame at 1, loop fills it. |
width | number | 1 | Width of each sheet relative to its shape's natural width. |
curl | number | 1 | How far the sheets curl around themselves. 0 keeps them flat. |
twist | number | 1 | How strongly the sheets twist along their length. The loop always twists in whole turns. |
billow | number | 1 | Strength of the slow, organic billowing that rolls through the silk. |
folds | number | 1 | Size of the billows. Higher values make smaller, more frequent folds. |
tilt | number | 0 | Tilts the composition towards or away from the viewer in degrees. |
turn | number | 0 | Turns the composition around the vertical axis in degrees. |
angle | number | 0 | Rotation in the plane of the screen in degrees. |
centerX | number | 0 | Horizontal offset, from -1 (left edge) to 1 (right edge). |
centerY | number | 0 | Vertical offset, from -1 (top) to 1 (bottom). |
speed | number | 1 | Overall pace of every motion. Negative values run it backwards. |
flow | number | 1 | How fast the particles stream along the threads. |
drift | number | 1 | How fast the billows travel through the silk. |
sway | number | 1 | Amount of slow, gentle tilting. 0 holds the orientation still. |
lightX | number | -0.4 | Horizontal direction of the light, from -1 (left) to 1 (right). |
lightY | number | 0.7 | Vertical direction of the light, from -1 (below) to 1 (above). |
gradient | number | 0.4 | How much the colour runs along the length of the sheets rather than following the light. The gradient drifts slowly as it animates. |
depth | number | 0.2 | How much lighter each sheet is than the one behind it. |
faces | number | 0.5 | How much deeper the far side of each sheet is than the side facing you. |
sheen | number | 0.3 | Soft brightening where the silk turns away from view. |
shade | number | 0.6 | How far the deep colour spreads over the silk. |
highlight | number | 0.2 | How far the pale highlight spreads over the lit side. |
contrast | number | 1 | Sharpness of the transitions between the deep, middle and light tones. |
blur | number | 0.4 | Depth of field. Sheets nearer or further than the middle soften into a glow. 0 keeps every particle sharp. |
intro | boolean | true | Lets the particles gather out of a soft haze when the silk first appears. |
interactive | boolean | true | Moving the pointer or a finger through the silk loosens the threads it passes into drifting dust that settles back. A click or tap makes the silk breathe out and gather again. |
stir | number | 1 | How far the threads loosen where the pointer passes. 0 turns it off. |
scatter | number | 1 | How far the silk breathes out on a click or tap. 0 turns it off. |
seed | number | 0 | Picks a different arrangement of the sheets and particles. |
paused | boolean | false | Freezes every motion. |
quality | number | 1 | Render resolution and particle budget, from 0.25 to 1. Lower it for very large backgrounds on slow devices. |
ref | { scatter } | — | scatter(strength?) makes the silk breathe out, for scroll or click triggers of your own. |
children | ReactNode | — | Content rendered above the silk. |
className | string | — | Classes for the root element. |
style | CSSProperties | — | Inline styles for the root element. |
colors[string, string]The light colour and the deep colour. The silk shades from one to the other through the hues between them, and its highlights are mixed towards white.
["#FF9FFC", "#5227FF"]backgroundColorstringColour behind the silk. On light backgrounds the particles build up like soft ink, on dark ones they glow. With transparent it picks up the colour of the page.
"transparent"shape"sweep" | "veil" | "dune" | "plume" | "loop"The composition. Sweep layers broad sheets that flow across the frame, veil hangs them like curtains, dune stacks them into drifting ribbons, plume rises diagonally through the frame, and loop twists a single band into a ring.
"sweep"layersnumberNumber of overlapping sheets. 0 uses the shape's own count.
0particlesnumberParticle density. The count follows the size of the container, so 1 keeps the silk equally fine at any size. Lower values make it airier and lighter to render.
1strandsnumberHow much the particles line up into threads. Low values give an even grain, high values show fine silk threads.
14grainSizenumberSize of each particle in CSS pixels.
1.1fuzznumberHow loosely the threads are spun. The edges of each sheet always fray a little more than its middle.
0.3opacitynumberOpacity of each particle. Lower values make the silk more see-through.
1sizenumberScale of the composition. Sweep, veil, dune and plume run past the edges of the frame at 1, loop fills it.
1widthnumberWidth of each sheet relative to its shape's natural width.
1curlnumberHow far the sheets curl around themselves. 0 keeps them flat.
1twistnumberHow strongly the sheets twist along their length. The loop always twists in whole turns.
1billownumberStrength of the slow, organic billowing that rolls through the silk.
1foldsnumberSize of the billows. Higher values make smaller, more frequent folds.
1tiltnumberTilts the composition towards or away from the viewer in degrees.
0turnnumberTurns the composition around the vertical axis in degrees.
0anglenumberRotation in the plane of the screen in degrees.
0centerXnumberHorizontal offset, from -1 (left edge) to 1 (right edge).
0centerYnumberVertical offset, from -1 (top) to 1 (bottom).
0speednumberOverall pace of every motion. Negative values run it backwards.
1flownumberHow fast the particles stream along the threads.
1driftnumberHow fast the billows travel through the silk.
1swaynumberAmount of slow, gentle tilting. 0 holds the orientation still.
1lightXnumberHorizontal direction of the light, from -1 (left) to 1 (right).
-0.4lightYnumberVertical direction of the light, from -1 (below) to 1 (above).
0.7gradientnumberHow much the colour runs along the length of the sheets rather than following the light. The gradient drifts slowly as it animates.
0.4depthnumberHow much lighter each sheet is than the one behind it.
0.2facesnumberHow much deeper the far side of each sheet is than the side facing you.
0.5sheennumberSoft brightening where the silk turns away from view.
0.3shadenumberHow far the deep colour spreads over the silk.
0.6highlightnumberHow far the pale highlight spreads over the lit side.
0.2contrastnumberSharpness of the transitions between the deep, middle and light tones.
1blurnumberDepth of field. Sheets nearer or further than the middle soften into a glow. 0 keeps every particle sharp.
0.4introbooleanLets the particles gather out of a soft haze when the silk first appears.
trueinteractivebooleanMoving the pointer or a finger through the silk loosens the threads it passes into drifting dust that settles back. A click or tap makes the silk breathe out and gather again.
truestirnumberHow far the threads loosen where the pointer passes. 0 turns it off.
1scatternumberHow far the silk breathes out on a click or tap. 0 turns it off.
1seednumberPicks a different arrangement of the sheets and particles.
0pausedbooleanFreezes every motion.
falsequalitynumberRender resolution and particle budget, from 0.25 to 1. Lower it for very large backgrounds on slow devices.
1ref{ scatter }scatter(strength?) makes the silk breathe out, for scroll or click triggers of your own.
—childrenReactNodeContent rendered above the silk.
—classNamestringClasses for the root element.
—styleCSSPropertiesInline styles for the root element.
—