Letters near the cursor scale up and brighten; letters further away dim and shrink — an inverse-distance attention effect.
import ProximityTextFx from '@crazygl/hero-proximitytextfx';
export default function Hero() {
return (
<ProximityTextFx
heading="follow the cursor"
radius={240}
peakScale={1.6}
/>
);
}radius (influence falloff in px), peakScale (max letter scale at the cursor), minBrightness (opacity floor for far letters).textColor, fontSize, headingFontFamily, headingFontWeight.bgColor or transparentBackground.npm install @crazygl/hero-proximitytextfxThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import ProximityTextFX from '@crazygl/hero-proximitytextfx';
export default function Landing() {
return (
<ProximityTextFX />
);
}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 ProximityTextFX from '@crazygl/hero-proximitytextfx';
export default function Page() {
return (
<section>
<ProximityTextFX
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}