A headline cast in transparent optical glass: Three.js TextGeometry extruded into a real 3D object, rendered with MeshPhysicalMaterial (transmission, IOR, dispersion, clearcoat) so it visibly refracts the moving gradient behind it. Pointer parallax tilts the camera and CTA hover sweeps a bright edge highlight across the letters.
import GlassTypography from '@crazygl/hero-glass-typography';
export default function Page() {
return (
<GlassTypography
heading="Crystalline."
backgroundImage="https://crazygl.com/samples/nature1.avif"
ior={1.45}
dispersion={1.2}
/>
);
}heading (the word cast in glass), subheading.ctaLabel, onCTAClick (URL string or function); hovering it triggers the sweep.textColor, transmission, roughness, ior, glassThickness, dispersion.envIntensity (procedural HDRI strength).bgMode (image / gradient), backgroundImage (image or video, cover-fit, screen-locked), or bgGradientStart/End/Angle + bgAnimationSpeed.pointerParallax, sweepColor, sweepDuration.headingFontFamily, headingFontWeight, headingY.npm install @crazygl/hero-glass-typographyThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import GlassTypography from '@crazygl/hero-glass-typography';
export default function Landing() {
return (
<GlassTypography />
);
}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 GlassTypography from '@crazygl/hero-glass-typography';
export default function Page() {
return (
<section>
<GlassTypography
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}