A wave travels along the heading following the cursor — each letter pops up as the wave passes, then settles back. Switch to auto mode for a hands-off demo.
import MouseWaveText from '@crazygl/hero-mousewavetext';
export default function App() {
return (
<MouseWaveText
heading="ride the wave"
mode="pointer"
amplitude={36}
textColor="#ffffff"
/>
);
}heading, the text rendered one span per letter.mode: pointer (the wave follows the cursor) or auto (it oscillates on its own).amplitude (peak letter rise in px), spread (how many characters the wave covers), autoSpeed (oscillation rate in auto mode).textColor, fontSize, headingFontFamily (any Google font), headingFontWeight.transparentBackground toggle, or a solid bgColor.npm install @crazygl/hero-mousewavetextThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import MouseWaveText from '@crazygl/hero-mousewavetext';
export default function Landing() {
return (
<MouseWaveText />
);
}The wrapper renders static HTML on the server and only initialises the canvas after hydration, so search engines see your copy.
// app/page.tsx — works in SSR-first frameworks (Next, Remix, Astro, etc.)
'use client';
import MouseWaveText from '@crazygl/hero-mousewavetext';
export default function Page() {
return (
<section>
<MouseWaveText
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}