A coloured highlighter sweeps across the line one word at a time — like a presenter underlining the key word as they speak it.
import HighlightCycling from '@crazygl/hero-highlight-cycling';
export default function Hero() {
return (
<HighlightCycling
heading="Design intentional. Ship ruthlessly."
highlightColor="#ffd86b"
stepMs={900}
/>
);
}heading text (split on whitespace into highlightable words).highlightColor, stepMs (dwell time per word).textColor, highlightTextColor, fontSize, headingFontFamily, headingFontWeight.transparentBackground, bgColor.npm install @crazygl/hero-highlight-cyclingThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import HighlightCycling from '@crazygl/hero-highlight-cycling';
export default function Landing() {
return (
<HighlightCycling />
);
}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 HighlightCycling from '@crazygl/hero-highlight-cycling';
export default function Page() {
return (
<section>
<HighlightCycling
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}