Many soft translucent gradient spheres drift in 3-D depth, blending into one another like abstract glass bubbles. Depth-of-field softens the back layers.
import SphereField from '@crazygl/hero-sphere-field';
export default function Hero() {
return (
<SphereField
heading="Soft glass."
count={14}
dofStrength={0.7}
/>
);
}bgTop / bgBottom: the vertical gradient behind the field.count (4–24), tintA / tintB / tintC: the three colour stops every sphere samples between.dofStrength) — how aggressively the back layers blur out.speed) — slow ambient bob of the field.headingFontFamily for the overlaid copy.npm install @crazygl/hero-sphere-fieldThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import SphereField from '@crazygl/hero-sphere-field';
export default function Landing() {
return (
<SphereField />
);
}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 SphereField from '@crazygl/hero-sphere-field';
export default function Page() {
return (
<section>
<SphereField
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}