A heading filled with a slowly-shifting multi-stop gradient that loops across up to five user colours, with controllable angle and speed.
import AnimatedTextGradient from '@crazygl/hero-animated-text-gradient';
export default function Hero() {
return (
<AnimatedTextGradient
heading={"Animated\nGradient Text"}
color1="#ff6b6b"
color2="#4ecdc4"
useColor3
color3="#45b7d1"
animationSpeed={8}
gradientAngle={90}
/>
);
}heading (supports \n line breaks).color1/color2 plus optional color3–color5 (each gated by a useColorN toggle), gradientAngle (0–360°) and animationSpeed (full loop in seconds).fontSize, letterSpacing, textAlign, headingFontFamily (Google Font), headingFontWeight.transparentBackground toggle and bgColor.npm install @crazygl/hero-animated-text-gradientThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import AnimatedTextGradient from '@crazygl/hero-animated-text-gradient';
export default function Landing() {
return (
<AnimatedTextGradient />
);
}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 AnimatedTextGradient from '@crazygl/hero-animated-text-gradient';
export default function Page() {
return (
<section>
<AnimatedTextGradient
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}