A static two-line headline with one slot that rotates through a list of words — the prefix and suffix stay put, the rotating word cycles.
import RotatingHeadline from '@crazygl/hero-rotatingheadline';
export default function Hero() {
return (
<RotatingHeadline
prefix="Software for"
rotators={`designers.\nfounders.\nstorytellers.`}
suffix="Build with confidence."
/>
);
}prefix line, rotators (one word per line), suffix line.holdMs (dwell per word), transitMs (slide duration).textColor, accentColor (rotator), subColor (suffix), fontSize, headingFontFamily (Google font), headingFontWeight.transparentBackground, bgColor.npm install @crazygl/hero-rotatingheadlineThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import RotatingHeadline from '@crazygl/hero-rotatingheadline';
export default function Landing() {
return (
<RotatingHeadline />
);
}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 RotatingHeadline from '@crazygl/hero-rotatingheadline';
export default function Page() {
return (
<section>
<RotatingHeadline
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}