WaveBackground

<WaveBackground>CSS Modules

Interactive 3D-looking wave surface on native WebGL — GPU-displaced mesh with pointer ripples, no Three.js. Fills any container, stays behind children. Parent controls background (canvas is transparent by default). Falls back to static CSS or Canvas 2D when WebGL is unavailable.

InstallationColoxo CLI
npx coloxo add wave-background
ES Module ImportPlayground / npm package
import { WaveBackground } from '@coloxo/ui/visuals';

1. Quick demo

Move the pointer over the panel. For the full hero, controls, and variants, open the Blocks page.

WebGL waves, native API

Parent paints the midnight background. Pointer ripples decay when you leave.

2. Blocks showcase

See the composed hero, live controls, CTA banner, and feature card examples on the Blocks page.

3. Props

NameTypeDefaultDescription
colorsstring[]—Wave palette (CSS color strings).
backgroundColorstring#050816Clear color when transparent is false.
speednumber1Animation speed (0.1–3).
amplitudenumber0.45Wave height (0–1).
frequencynumber1Spatial frequency (0.25–2).
complexitynumber0.55Extra wave-layer mix (0–1).
intensitynumber0.7Lighting / contrast (0–1).
interactionbooleantrueEnable pointer deformation.
interactionStrengthnumber0.65Dent strength (0–1).
interactionRadiusnumber0.22Influence radius as fraction of min dimension (0.05–0.6).
interactionDecaynumber0.55How quickly interaction decays after leave (0.1–1).
quality"low" | "medium" | "high"mediumMesh density and DPR scale.
fallback"static" | "canvas"staticUsed when WebGL is unavailable.
pausedbooleanfalseStop continuous animation.
transparentbooleantrueAlpha-cleared canvas so the parent controls background. false clears with backgroundColor.
respectReducedMotionbooleantrueHonor prefers-reduced-motion (static frame, no pointer deformation).