Mediaexperimental
Undertow
Liquid image reveal
Two images and one membrane: the pointer parts the surface and the picture beneath comes through.
A tap works too, so the reveal is not lost on a touch screen.
Customize
Disturbancehow far the pointer parts the surface, and how it settles
0.300
radius0.55
strength0.38
softness1.00
speed2.40
lingerinteractiveUsage
<Undertow />Generated from the controls above. Only props that differ from their defaults are shown.
Props
| Property | Type | Default | Description |
|---|---|---|---|
radius | number | 0.3 | Radius. Range 0.08 to 0.6. |
strength | number | 0.55 | Strength. Range 0 to 1. |
softness | number | 0.38 | Softness. Range 0 to 1. |
speed | number | 1 | Speed. Range 0.2 to 3. |
linger | number | 2.4 | Linger. Range 0.2 to 8. |
interactive | boolean | true | React to the pointer. |
frontSrc | string | — | The image on top, the one the pointer parts. |
backSrc | string | — | The image underneath, revealed where the surface is disturbed. |
alt | string | — | Describes the pair; both images render into one canvas. |
objectPosition | string | "50% 50%" | Where both images sit when the box crops them. |
aspect | string | — | Locks the box to a ratio, for example `16 / 10`. |
disabled | boolean | false | Holds the still, composed state instead of animating. |
Dependencies
0 external runtime dependencies
Ships with nothing but React.
Experimental: still under evaluation and not part of the published package yet.