Liquid Wave

A mesmerizing fluid dynamics background with interactive mouse-driven waves and customizable colors.

Loading WebGL Simulation...

Installation

Run the following command to install the component:

npx rareui add LiquidWave

This will install the component to components/rareui/ directory.

Usage

import LiquidWave from '@/components/rareui/Interactive Background/LiquidWave';

export default function App() {
  return (
    <div className="w-full h-screen">
      <LiquidWave />
    </div>
  );
}

Custom Colors

<LiquidWave 
  color1="#5227FF"
  color2="#FF9FFC"
  color3="#B19EEF"
/>

Custom Force and Cursor Size

<LiquidWave 
  mouseForce={30}
  cursorSize={150}
/>

With Viscosity

<LiquidWave 
  isViscous={true}
  viscous={50}
/>

Props

PropTypeDefaultDescription
color1string"orange"Primary gradient color (any CSS color format)
color2string"orange"Secondary gradient color (optional)
color3string"orange"Tertiary gradient color (optional)
mouseForcenumber20Strength of mouse interaction (0-100)
cursorSizenumber100Size of the interaction cursor in pixels
isViscousbooleanfalseEnable viscous fluid behavior
viscousnumber30Viscosity strength (only when isViscous is true)
isBouncebooleanfalseEnable boundary bounce effect
dtnumber0.014Time delta for simulation step
resolutionnumber0.5Simulation resolution (0.1-1.0, higher = better quality)
iterationsPoissonnumber32Pressure solver iterations (higher = more accurate)
iterationsViscousnumber32Viscosity solver iterations
BFECCbooleantrueUse BFECC advection for better stability
classNamestring""Additional CSS classes for the canvas