npm package

noise-wave-flow

Organic noise-field canvas animation with a wind-cursor effect.
Framework-agnostic — React hook included.

npm install @elysian256/noise-wave-flow ⎘
Live Customize
gradient
0.3
30
6
8
2.5
200
0.07
0.18
0.055
trackMouse
trackScroll

Vanilla JS

import { mountNoiseFlow } from '@elysian256/noise-wave-flow';

// Creates and injects a <canvas> automatically
const flow = mountNoiseFlow(document.getElementById('hero'), {
  color: '255,255,255',
  alpha: 0.14,
});

flow.update({ alpha: 0.06 }); // live-patch without restart
flow.destroy();               // stop and remove canvas

React

import { useNoiseFlow } from '@elysian256/noise-wave-flow/react';

function Hero() {
  const { canvasRef, containerRef } = useNoiseFlow({
    color: '255,255,255',
    alpha: 0.14,
  });

  return (
    <section ref={containerRef} style={{ position: 'relative' }}>
      <canvas ref={canvasRef} style={{
        position: 'absolute', inset: 0,
        width: '100%', height: '100%', pointerEvents: 'none',
      }} />
      <div style={{ position: 'relative', zIndex: 1 }}>
        {/* your content */}
      </div>
    </section>
  );
}

Config reference

Option Default Description
spacing28Grid-point distance in px
steps5Streamline steps per seed point
stepLen8Px per step at full mouse intensity
idleStep2.5Px per step at idle
windRadius200Cursor wind influence radius in px
mouseLerp0.07Mouse position lerp speed (0–1)
windLerp0.18Wind velocity lerp speed (0–1)
intensityLerp0.055Hover fade-in / fade-out speed (0–1)
color'255,255,255'RGB string for rgba(), e.g. '37,99,235'
alpha0.3Base opacity at idle
trackMousetrueEnable wind-cursor effect
trackScrolltrueEnable scroll-drift on streamlines
worldOffsetnull{x,y} | () => {x,y} | 'screen' — offset noise coords across canvases