About
Move pool light across a color or a photo, with rings where the pointer passes.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Water to your project and fits it to your theme.
Code
How Water is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import Water from "@/components/ui/honest-water";
interface WaterSettings {
src: string;
deepColor: string;
shallowColor: string;
highlightColor: string;
intensity: number;
scale: number;
distortion: number;
dispersion: number;
speed: number;
ripples: boolean;
}
const surfaceOptions = [
{ label: "Color gradient", value: "none" },
{
label: "Alpine dusk photo",
value: "https://cdn.21st.dev/assets/mirror/2f/2f0f4f8872c14bf6371a864f07ab79be9bb0a7892731b3c5e14ddbb9354c5095.jpg",
},
] as const;
const defaults: WaterSettings = {
src: "none",
deepColor: "#0b3a4f",
shallowColor: "#1d7a8c",
highlightColor: "#e6fbff",
intensity: 1,
scale: 1,
distortion: 0.6,
dispersion: 0.3,
speed: 1,
ripples: true,
};
export default function WaterDemo() {
const settings = defaults;
// The gradient colors only apply without an image, so they're left out of
// the generated code when a photo is chosen, and src when it is not.
const hasImage = settings.src !== "none";
const entries = Object.entries(settings) as [keyof WaterSettings, WaterSettings[keyof WaterSettings]][];
return (
<div className="flex min-h-[420px] w-full items-center justify-center p-6">
<div className="h-80 w-full max-w-xl overflow-hidden rounded-xl">
<Water className="size-full" {...settings} src={hasImage ? settings.src : undefined} />
</div>
</div>
);
}
















