Water Reflection

Snowy peaks under the Milky Way above a dark line of pines

Surface study no. 04

Form that refuses to hold still.

A studio for identities that move. We cast brands in liquid metal, then let them settle into something you can hold.

About this component

Water Reflection

A live WebGL surface that sets any landscape photo above a still lake and mirrors it in the water: a rolling swell drawn in perspective, glints on the crests, drops that land on their own and ripple rings that follow the cursor. Waterline, crop, water color, reflectivity, swell, speed, glints, rain and ripples are all props. Grows softly out of the water color on load, adapts its resolution to the device, pauses offscreen, holds a calm frame for reduced motion and falls back to the plain photo without WebGL.

Usage

The import and the props worth knowing about, in one place.

import { WaterReflection } from "@/components/beste/component/water-reflection";

// As a panel or a layer behind content
<WaterReflection
  className="aspect-[16/8] rounded-md"
  src="https://images.unsplash.com/photo-1519681393784-d120267933ba?w=2400&q=80"
  alt="Snowy peaks under the Milky Way"
  horizon={0.42}        // waterline height, 0 to 1 from the bottom
  crop={0.12}           // trims the photo's foreground above the waterline
  waterColor="#070b14"  // any CSS color, tokens included
  waves={0.6}           // swell strength, 0 to 1
  rain={0.4}            // drops landing on their own, 0 to 1
/>

Props

Read from the component's own type, so this cannot drift from what it accepts.

PropTypeDefaultDescription
src*string—Photo shown above the water and mirrored in it. Loaded with CORS so WebGL can read it.
altstring—Description of the photo for screen readers.
horizonnumber—Height of the waterline from the bottom, 0 to 1.
cropnumber—Share of the photo's bottom cut away before it meets the water, 0 to 0.9.
waterColorstring—Color of the water itself, seen where it reflects less. Any CSS color.
reflectivitynumber—How much of the landscape the water mirrors, 0 to 1.
wavesnumber—Strength of the rolling swell, 0 to 1.
speednumber—Motion speed, 1 is the default pace.
glintsnumber—Sparkle of light on the wave crests, 0 to 1.
rainnumber—How often drops land on their own, 0 (never) to 1 (a light shower).
interactiveboolean—Ripples follow the cursor across the water.
ripplesnumber—Strength of every ripple ring, 0 to 1.
pausedboolean—Freeze the water on its current frame.
classNamestring—
childrenReactNode—

More Background components

View all Background
A city street at dusk with car lights and lit towers