Text revealed as a moving circular mask sweeps across — the headline appears only where the image-shaped mask uncovers it.
import MaskTextReveal from '@crazygl/hero-mask-text-reveal';
export default function Hero() {
return (
<MaskTextReveal
heading="look closer"
maskRadius={22}
softness={30}
sweepSec={4}
/>
);
}heading text.maskRadius (spotlight size %), softness (feathered edge %), sweepSec (loop duration).dimColor (hidden text), revealColor (lit text), fontSize, headingFontFamily, headingFontWeight.transparentBackground, bgColor.npm install @crazygl/hero-mask-text-revealThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import MaskTextReveal from '@crazygl/hero-mask-text-reveal';
export default function Landing() {
return (
<MaskTextReveal />
);
}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 MaskTextReveal from '@crazygl/hero-mask-text-reveal';
export default function Page() {
return (
<section>
<MaskTextReveal
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}