A single heading word, rasterised to a true signed distance field and rendered in WebGL. Where the cursor hovers, the letters dissolve into a soft luminous bokeh — a variable-radius radial blur kernel sampled in distance space, with optional chromatic aberration. Move the cursor across the word to smear it into a beam of light; move away and it snaps back to a razor-sharp typeface.
import SdfLensBlur from '@crazygl/hero-sdf-lens-blur';
export default function Page() {
return (
<SdfLensBlur
text="FOCUS"
fontWeight={200}
lensStrength={0.05}
glowColor="#ffffff"
/>
);
}text (one short ALL-CAPS word reads best), fontWeight, fontSize, letterSpacing, textShiftX/Y. The word is drawn into the SDF on the GPU; there is no HTML copy.baseBlur (always-on softness), lensStrength (peak under cursor), lensRadius (Gaussian σ), chromatic (lens fringe).textColor, backgroundColor, glowColor, glowIntensity (additive bloom).transparent to composite over your own page background.npm install @crazygl/hero-sdf-lens-blurThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import SDFLensBlur from '@crazygl/hero-sdf-lens-blur';
export default function Landing() {
return (
<SDFLensBlur />
);
}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 SDFLensBlur from '@crazygl/hero-sdf-lens-blur';
export default function Page() {
return (
<section>
<SDFLensBlur
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}