Docs
Floating waves
Floating waves
A floating waves component.
Installation
Copy and paste the Floating Dock code into your project.
API Reference
First Dock
Props
Prop | Type | Description |
---|---|---|
waveSpeedX | number | Horizontal speed of the wave movement. Controls the speed at which the water waves move along the X-axis. |
waveSpeedY | number | Vertical speed of the wave movement. Controls the speed at which the water waves move along the Y-axis. |
waveAmpX | number | Amplitude of the wave movement on the X-axis. Determines how wide the water waves are. |
waveAmpY | number | Amplitude of the wave movement on the Y-axis. Determines how tall the water waves are. |
backgroundColor | string | Background color of the water ripple effect container. Can be set to transparent for a clean effect over images. |
lineColor | string | Color of the water ripple effect lines. Typically a semi-transparent white to mimic the look of water. |
style | object | Custom styles for the ripple effect container, allowing further control over its appearance (e.g., background images). |
Usage
export default function App() {
return (
<div className="relative w-full h-[800px]">
<WaterRippleEffect
waveSpeedX={0.02}
waveSpeedY={0.01}
waveAmpX={50}
waveAmpY={30}
backgroundColor="transparent"
lineColor="rgba(255, 255, 255, 0.3)"
style={{
backgroundImage: "url(https://img.buoucoding.com/image/17.jpg)",
backgroundSize: "cover",
}}
/>
</div>
)
}