A clear glass DOME — a magnifying loupe / plano-convex lens — glides over a vibrant artwork with your heading composited on top. By default the artwork is an animated domain-warped colour field; supply your own image or video instead (cover-fit, never stretched). Beneath the lens everything is magnified UPRIGHT (not flipped like a glass marble), like a loupe sitting on the page: the centre magnifies cleanly, straight features curve more toward the rim, red/cyan chromatic fringing grows toward the edge, a Fresnel ring traces the rim and a specular hotspot sits upper-left. Because the heading is part of the scene, it reads normally outside the lens and is magnified, gently bent and chromatically split where the lens passes over it.
import ArtworkLens from '@crazygl/hero-artwork-lens';
export default function Hero() {
return (
<ArtworkLens
heading="Look closer."
subheading="A glass lens glides across the artwork, magnifying and bending every colour beneath it."
magnification={1.6}
dispersion={0.6}
/>
);
}heading, subheading (rasterised into the scene so the lens can magnify them).artworkImage (image OR video, cover-fit); procedural palette colorA/colorB/colorC and artworkSpeed when no media is supplied.lensRadius, magnification (centre zoom), refraction (dome curvature / rim bend), dispersion (chromatic fringing), rimBrightness (Fresnel rim + specular glint).transparent to keep only the glass over whatever sits behind the hero.npm install @crazygl/hero-artwork-lensThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import ArtworkLens from '@crazygl/hero-artwork-lens';
export default function Landing() {
return (
<ArtworkLens />
);
}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 ArtworkLens from '@crazygl/hero-artwork-lens';
export default function Page() {
return (
<section>
<ArtworkLens
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}