Ripple Pool
Web (React)
A swirling gradient that ripples like water under the cursor.
A slow swirling gradient with fluid ripples that trail the cursor. It fills its positioned parent and freezes its animation when the user prefers reduced motion. Built on the shaders library (MIT) and rendered with WebGPU.
Move to ripple
Installation
CLI
npx @modus-ui/cli add ripple-poolManual
- Install
shaderswithnpm install shaders. - Copy the code from the component tab.
- Create a file at
components/ui/ripple-pool.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
colorA | string | "#04121f" | First swirl colour. |
colorB | string | "#38bdf8" | Second swirl colour. |
speed | number | 0.5 | Swirl speed. |
detail | number | 1 | Swirl detail. |
intensity | number | 10 | Ripple strength. |
radius | number | 0.5 | Ripple radius. |
decay | number | 10 | How quickly ripples settle. |
chromaticSplit | number | 1 | Colour split in the ripples. |
Comments