A static prefix with a vertical slot-machine rotator behind it — each word slides up, settles, and the next one rises into place.
import TextRotation from '@crazygl/hero-text-rotation';
export default function Hero() {
return (
<TextRotation
prefix="Built for"
rotators={"designers.\nfounders.\nstorytellers.\nbuilders."}
rotatorColor="#5b8def"
/>
);
}prefix, rotators (one word per line), suffix.holdDuration (ms a word stays), transitionDuration (ms of the flip).textColor, rotatorColor, fontSize, headingFontFamily, headingFontWeight.transparentBackground, bgColor.npm install @crazygl/hero-text-rotationThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import TextRotation from '@crazygl/hero-text-rotation';
export default function Landing() {
return (
<TextRotation />
);
}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 TextRotation from '@crazygl/hero-text-rotation';
export default function Page() {
return (
<section>
<TextRotation
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}