Headline acts as a window onto a slowly drifting photograph — large letterforms, the photograph showing through them, a clean colored hero around the cut-out.
import TextMasking from '@crazygl/hero-text-masking';
export default function Hero() {
return (
<TextMasking
heading="wild"
image="https://crazygl.com/samples/nature1.avif"
driftSpeed={0.4}
/>
);
}heading, subheading, image (the masked photo).driftSpeed, driftAmount (idle pan), parallaxStrength (pointer parallax).fontSize, headingFontFamily, headingFontWeight, letterSpacing, subColor.transparentBackground, bgColor.npm install @crazygl/hero-text-maskingThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import TextMasking from '@crazygl/hero-text-masking';
export default function Landing() {
return (
<TextMasking />
);
}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 TextMasking from '@crazygl/hero-text-masking';
export default function Page() {
return (
<section>
<TextMasking
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}