A hover-focus hero: a bold display word is rendered as a true signed-distance field and softens or sharpens under the cursor via an SDF lens blur (no chromatic aberration), while an animated 3D character floats in front — playing its loop animation, tilting toward the pointer in 3D, and bobbing as if weightless. Drop in any animated .glb (e.g. an astronaut).
import MorphAstronaut from '@crazygl/hero-morph-astronaut';
export default function Page() {
return (
<MorphAstronaut
word="COSMOS"
model="https://crazygl.com/samples/astronaut.glb"
textColor="#ff1919"
/>
);
}word, textColor, fillWidth (auto-fits any word length), letterSpacing, fontFamily, fontWeight.lensStrength, lensRadius (focus spot size), baseBlur (base softness), glowIntensity, glowColor.model (any animated .glb), animationName, modelScale, modelYOffset, lightIntensity, starfield / starCount / starColor.pointerTilt, spin (idle turntable), floatAmount, floatSpeed.backgroundColor, transparentBackground.The default uses a sample floating astronaut (Idle loop). Point
modelat your own animated GLB to reskin it.
The sample model — “Animated Floating Astronaut in Space Suit Loop” — is from Sketchfab. Swap in your own animated GLB via the model prop; if you keep theirs, honour its license and attribution.
npm install @crazygl/hero-morph-astronautThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import MorphAstronaut from '@crazygl/hero-morph-astronaut';
export default function Landing() {
return (
<MorphAstronaut />
);
}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 MorphAstronaut from '@crazygl/hero-morph-astronaut';
export default function Page() {
return (
<section>
<MorphAstronaut
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}