Water Ripple
ProA photo under live water: the cursor leaves a wake, a click drops a ripple.
Customize
<WaterRipple src={src} />Changes show live and stay in the address, so a link keeps them.
Code
This one is a Pro component
Pro components come with Pro Components, any Templates plan or All-Access. Sign in, or enter your licence key, to see the code here and copy it, or install it with the shadcn CLI below.
Install
With the shadcn CLI
Pro components install from a private registry that checks your licence key (Pro Components, a Templates plan or All-Access). Set it up once per project. The key stays in an environment variable and never goes into components.json.
1. Add the registry
Merge this into components.json.
{
"registries": {
"@dimaac-pro": {
"url": "https://api.dimaac.com/v1/ui/r/{name}.json",
"headers": { "Authorization": "Bearer ${DIMAAC_LICENSE_KEY}" }
}
}
}2. Add your key
Put it in .env.local (or your shell) and keep that file out of git. The CLI fills in ${DIMAAC_LICENSE_KEY} from it.
DIMAAC_LICENSE_KEY=your-licence-key3. Add the component
npx shadcn@latest add @dimaac-pro/water-ripple@dimaac-pro is the registry from step 1. More in Docs
By hand
# Nothing to install: it only needs React- It needs nothing but React 19.
- Copy the component file from the Code panel (once your licence key unlocks it) into components/dimaac/water-ripple.tsx.
- It's styled with Tailwind v4 classes. If that folder sits outside the places Tailwind scans, add it with @source in your CSS.
- Import it with import { WaterRipple } from "@/components/dimaac/water-ripple" and give its parent a size: it fills it.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
src (required) | string | - | The photo under the water. Remote images need CORS (WebGL reads their pixels). |
alt | string | "" | Describes the photo for screen readers. Empty means the photo is decoration. |
damping | number | 0.993 | How much of its motion the water keeps each step (120 steps a second). Higher rings for longer. |
strength | number | 0.6 | How hard the cursor and clicks push the water, from 0 to 1. |
dropRadius | number | 30 | Radius of a click's drop, in pixels. The cursor's wake is about half as wide. |
refraction | number | 0.55 | How much the water bends the photo, from 0 to 1. |
highlight | number | 0.6 | How bright the light on the ripples is, from 0 to 1. |
autoDrops | boolean | true | Drops a ripple now and then by itself, so the water lives without input. |
className | string | "" | Extra classes for the outer box. Give it a size (it fills it). |
children | ReactNode | - | Content shown over the water. The cursor keeps stirring it under the content. |
Use with AI
Agent prompt
Paste it into Claude Code, Cursor or any coding agent, or open it straight in a chat. It carries your Customize settings.
Add the Water Ripple component (<WaterRipple />) from DiMaac UI to this project. It is a Pro component, so its source needs the owner's DiMaac licence key (Pro Components, a Templates plan or All-Access).
Docs: https://ui.dimaac.com/components/water-ripple
1. Add the Pro registry to components.json (merge it into "registries"). Don't write the key into the file:
{
"registries": {
"@dimaac-pro": {
"url": "https://api.dimaac.com/v1/ui/r/{name}.json",
"headers": { "Authorization": "Bearer ${DIMAAC_LICENSE_KEY}" }
}
}
}
2. The owner puts their licence key in .env.local (keep it out of git): DIMAAC_LICENSE_KEY=your-licence-key
Ask them for it if it isn't set. Never print it or commit it.
3. Install it with:
npx shadcn@latest add @dimaac-pro/water-ripple
The registry item is https://api.dimaac.com/v1/ui/r/water-ripple.json and wants the header "Authorization: Bearer <licence key>".
Then use it like this:
import { WaterRipple } from "@/components/dimaac/water-ripple";
<WaterRipple src={src} />
It uses Tailwind v4 classes, so make sure Tailwind scans that folder.
Give its parent a size, keep light and dark mode working and keep its prefers-reduced-motion fallback.
Full index for agents: https://ui.dimaac.com/llms.txtFiles agents read
- llms.txt
- Every component and how to install it
- water-ripple.md
- This page as Markdown: install, props and the full source
About
A photo rendered under a real-time water simulation. Moving the cursor drags a gentle wake through it, and a click or tap drops a strong ripple that spreads, bounces off the edges and calms down. The water bends the photo with a hint of colour fringing and catches a soft light on its slopes. It runs a height-field simulation in WebGL2 at a fixed 120 steps a second on any screen, uses half-float textures where the GPU allows and a packed 8-bit format where it doesn't, stops drawing when the water is calm, cover-fits the photo on resize and drops a ripple now and then by itself. A keyboard button drops one too. When the visitor prefers reduced motion the photo stays still and only clicks make short, quickly settling ripples.
- Installs to
components/dimaac/water-ripple.tsx- Uses
- React only
- Tags
- webgl, shader, cursor, image, water, simulation, hero
Photo (pool) by Binks AI on Lummi (Lummi License). Photo (shallows) by Mikiwa on Lummi (Lummi License). Photo (dawn) by Viri Gutiérrez on Lummi (Lummi License).