honestui

Water

Shaders

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>
  );
}

Dependencies

More by honestui

View all
  • Chromatic Text Reveal

    Chromatic Text Reveal

    31
  • Schedule Builder

    Schedule Builder

  • Audit Log

    Audit Log

  • Secret Row

    Secret Row

  • Undoable Action

    Undoable Action

  • OTP Field

    OTP Field

  • Audio Orb

    Audio Orb

  • AI Glow Border

    AI Glow Border

More in Shaders

View all
  • Glass Fold

    Glass Fold

    591
  • Shader Animation

    Shader Animation

    3.9K
  • Chroma Sense Hero

    Chroma Sense Hero

    23
  • LightSpeed

    LightSpeed

    253
  • Illos Knowledge Sources

    Illos Knowledge Sources

    76
  • Animated Shader Background

    Animated Shader Background

    2.1K
  • Molten Pillars

    Molten Pillars

    18
  • Shader Lines

    Shader Lines

    2.5K