Two stacked paragraphs — a primary line shown in the surface colour, and a secret reveal line shown only inside a cursor-following spotlight that grows on hover.
import CursorRevealText from '@crazygl/hero-cursor-reveal-text';
export default function Page() {
return (
<CursorRevealText
primaryText="I'm a selectively skilled product designer..."
revealText="Crafting elegant solutions through code..."
hoverSize={400}
/>
);
}primaryText, revealText.defaultSize (resting diameter), hoverSize (diameter over text), cursorFollowSpeed (0.05 liquid → 1 snaps), transitionDuration (grow/shrink ease).bgColor, textColor, revealBgColor, revealTextColor; pair contrasting hues for the strongest effect.fontSize, lineHeight, maxWidth, headingFontFamily, headingFontWeight.npm install @crazygl/hero-cursor-reveal-textThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import CursorRevealText from '@crazygl/hero-cursor-reveal-text';
export default function Landing() {
return (
<CursorRevealText />
);
}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 CursorRevealText from '@crazygl/hero-cursor-reveal-text';
export default function Page() {
return (
<section>
<CursorRevealText
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}