Introducing Nyx UI v1.2.0

Water Ripple Effect

A stunning WebGL-based water ripple effect component with customizable wave patterns and interactive mouse controls.

Installation

Usage

import WaterRippleEffect from "@/components/ui/water-ripple-effect";
// Basic usage with default settings
<WaterRippleEffect
  imageSrc="/path/to/your/image.jpg"
  width={400}
  height={400}
/>

Props

PropTypeDefaultDescription
imageSrcstringRequiredSource URL or path to the image that will have the water ripple effect
widthnumber920Width of the canvas in pixels
heightnumber955Height of the canvas in pixels
waveIntensitynumber0.006Intensity of the global wave distortion (0-1)
rippleIntensitynumber0.012Intensity of the mouse-triggered ripple effects (0-1)
animationSpeednumber1.0Speed multiplier for all animations (0.1-5.0)
hoverRippleMultipliernumber4.0Multiplier for ripple intensity when hovering (1-10)
transitionSpeednumber0.08Speed of transitions between hover states (0.01-0.5)
waveFrequencynumber10.0Frequency of the global wave patterns (1-50)
rippleFrequencynumber20.0Frequency of the mouse-triggered ripples (5-100)
distortionAmountnumber0.008Amount of directional distortion applied to the image (0-0.1)
scalenumber1.0Scale factor for the entire component (0.1-2.0)
classNamestring""Additional CSS classes to apply to the canvas container
containerClassNamestring""Additional CSS classes to apply to the outer container
onHover() => voidOptionalCallback function triggered when mouse enters the component
onLeave() => voidOptionalCallback function triggered when mouse leaves the component