Rain Ripples

Rain falling on still water: drops spread into flattened rings. Click to drop your own.

no dependenciesMIT · free

Hujan di laut.

Click anywhere to drop a stone.

Installation

npx shadcn@latest add https://ombakui.com/r/rain-ripples.json

Usage

import { RainRipples } from "@/components/rain-ripples";

<RainRipples className="h-[480px] bg-slate-900 text-sky-200" rate={8}>
  <h1>Rain on the sea.</h1>
</RainRipples>

Props

PropTypeDefaultDescription
childrenReactNode–Content rendered on top.
ratenumber6Raindrops per second.
colorstring"currentColor" (set it with a text-* class)Ring color.
maxRadiusnumber70Largest ring radius in px.
tiltnumber0.45Tilt of the water surface; 1 is seen from above, lower flattens the rings.
interactivebooleantrueClicking or tapping drops a bigger ripple.
classNamestring–