Components
Water Ripples
Ripples that spread where the cursor moves.
ProPro, coming soon.
Move your pointer here
<WaterRipples>
<Hero />
</WaterRipples>Get notified
Water Ripples is a Pro effect. Join the waitlist and we'll email you when it's available.
Usage
Rings spread out from the pointer as it moves, like ripples on water, and fade as they grow. It draws on a canvas, and the drawing stops while it's off-screen or the tab is hidden. Without canvas support, your content shows on its own.
import { WaterRipples } from "@zjkm/pro/water-ripples";
export function Hero() {
return (
<WaterRipples className="rounded-2xl bg-neutral-950 p-16">
<h1 className="text-white">Make a splash</h1>
</WaterRipples>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Content shown over the ripples. | |
color | string | "#38bdf8" | Ring colour. |
speed | number | 140 | Pixels per second the rings spread. |
lifetime | number | 1.6 | Seconds a ring lasts. |
className | string | Classes for the wrapper. |
With reduced motion, it draws one still frame and doesn't react to the pointer.