A heading whose colour sweeps from start to end as the user scrolls — uses background-clip:text for crisp gradient handover.
import ScrollTextColor from '@crazygl/hero-scrolltextcolor';
export default function Hero() {
return (
<ScrollTextColor
heading="We design for clarity, ship with confidence."
startColor="#111111"
endColor="#ffffff"
scrollStart={15}
scrollEnd={70}
/>
);
}startColor, endColor, softness (edge blend %), angle (sweep direction).scrollStart / scrollEnd (where in the scroll-through the reveal runs).fontSize, headingFontFamily, headingFontWeight, lineHeight.transparentBackground, bgColor.npm install @crazygl/hero-scrolltextcolorThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import ScrollTextColor from '@crazygl/hero-scrolltextcolor';
export default function Landing() {
return (
<ScrollTextColor />
);
}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 ScrollTextColor from '@crazygl/hero-scrolltextcolor';
export default function Page() {
return (
<section>
<ScrollTextColor
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}