- Docs
- Components
- Backgrounds
- Rubber Fluid
Glossy rubber folds of color drifting slowly
| Name | Type | Default | Description |
|---|---|---|---|
colors | [string, string] | ["#9D0FD9", "#FF12FF"] | The two colours of the folds, blended in OKLCh. The first tints their edges and shadowed sides, the second their glowing crests. On light backgrounds they become deeper, matching tones. |
backgroundColor | string | "transparent" | Colour behind the rubber. The valleys sink into it. Transparent shows the page behind and reads its colour to pick a light or dark rendering. |
speed | number | 1 | Speed of the slow drift of the folds. |
scale | number | 1 | Size of the folds. Larger values give broader folds. |
foldDepth | number | 1 | Relief of the folds under the studio light. Zero gives a flat glow. |
gloss | number | 0.2 | Strength of the reflection of the studio light. |
sheen | number | 0.12 | Strength of the soft rim light on the far sides of the folds. |
roughness | number | 0.4 | Blur of the highlights. Low values give crisp latex, high values soft satin. |
lightAngle | number | 135 | Direction of the studio light in degrees (0 is right, 90 is up). |
contrast | number | 5 | How sharply the folds rise from the background. Higher values leave more of the frame in shadow. |
waveStrength | number | 1 | Strength of the wave a click or tap sends through the rubber, from 0 to 3. |
iterations | number | 10 | Layers of folding. Fewer layers give broad, calm folds. More add fine creases. |
rotationRate | number | 2 | How much each layer of folds turns, which sets the swirl. |
warpPower | number | 1.5 | How far the rubber is stretched. Low values give soft, wide flows. |
seedFactor | number | 1 | Varies the pattern of folds. Values from 0.3 to 1.5 work best. |
opacity | number | 1 | Overall opacity of the rubber. |
interactive | boolean | true | Click or tap to send a wave through the rubber. Waves stack. Hovering tightens the surface slightly, so the sheen sharpens. |
intro | boolean | true | The folds spring up and settle when the component appears. |
paused | boolean | false | Stops the motion. Reduced-motion users get a still frame. |
dpr | number | 2 | Maximum device pixel ratio for the canvas. |
width | string | number | "100%" | Width of the root element. |
height | string | number | "100%" | Height of the root element. |
children | ReactNode | undefined | Content laid over the rubber. Clicks on its links and buttons never send waves. |
ref | { poke, replay } | undefined | poke(x?, y?, strength?) sends a wave from a point (0 to 1 across the component), replay() plays the intro again. |
className | string | undefined | Classes for the root element. |
style | CSSProperties | undefined | Inline styles for the root element. |
colors[string, string]The two colours of the folds, blended in OKLCh. The first tints their edges and shadowed sides, the second their glowing crests. On light backgrounds they become deeper, matching tones.
["#9D0FD9", "#FF12FF"]backgroundColorstringColour behind the rubber. The valleys sink into it. Transparent shows the page behind and reads its colour to pick a light or dark rendering.
"transparent"speednumberSpeed of the slow drift of the folds.
1scalenumberSize of the folds. Larger values give broader folds.
1foldDepthnumberRelief of the folds under the studio light. Zero gives a flat glow.
1glossnumberStrength of the reflection of the studio light.
0.2sheennumberStrength of the soft rim light on the far sides of the folds.
0.12roughnessnumberBlur of the highlights. Low values give crisp latex, high values soft satin.
0.4lightAnglenumberDirection of the studio light in degrees (0 is right, 90 is up).
135contrastnumberHow sharply the folds rise from the background. Higher values leave more of the frame in shadow.
5waveStrengthnumberStrength of the wave a click or tap sends through the rubber, from 0 to 3.
1iterationsnumberLayers of folding. Fewer layers give broad, calm folds. More add fine creases.
10rotationRatenumberHow much each layer of folds turns, which sets the swirl.
2warpPowernumberHow far the rubber is stretched. Low values give soft, wide flows.
1.5seedFactornumberVaries the pattern of folds. Values from 0.3 to 1.5 work best.
1opacitynumberOverall opacity of the rubber.
1interactivebooleanClick or tap to send a wave through the rubber. Waves stack. Hovering tightens the surface slightly, so the sheen sharpens.
trueintrobooleanThe folds spring up and settle when the component appears.
truepausedbooleanStops the motion. Reduced-motion users get a still frame.
falsedprnumberMaximum device pixel ratio for the canvas.
2widthstring | numberWidth of the root element.
"100%"heightstring | numberHeight of the root element.
"100%"childrenReactNodeContent laid over the rubber. Clicks on its links and buttons never send waves.
undefinedref{ poke, replay }poke(x?, y?, strength?) sends a wave from a point (0 to 1 across the component), replay() plays the intro again.
undefinedclassNamestringClasses for the root element.
undefinedstyleCSSPropertiesInline styles for the root element.
undefined