Light Prism — React Glass Effect
A solid optical prism with internal reflections, spectral caustics and a textured light field. Powered by Vercel’s complete MIT prism pipeline.

Starting live preview
Usage
import { LightPrism, LIGHT_PRISM_PRESETS } from "@/components/LightPrism";
export function PrismHero() {
return (
<section style={{ position: "relative", minHeight: "100dvh" }}>
<LightPrism {...LIGHT_PRISM_PRESETS.paper}
{...{
interactive: true,
speed: 1,
prismSize: 0.3,
beamWidth: 0.0045,
refraction: 0.16,
dispersion: 0.22,
shadow: 1,
from: "#d2ccc2"
}}
/>
<div style={{ position: "relative", zIndex: 1, padding: "8rem 2rem" }}>
<h1>Refract the ordinary</h1>
</div>
</section>
);
}Implementation notes & API
Vercel VGPU MIT light pipeline: actual beveled prism geometry, spectral ray optics, HDR environment, wall bake, back/front glass and caustic passes. Adapted from the public Vercel source with its MIT license. All assets are embedded; no external network requests. The compatibility LIGHT_PRISM_SHADER export is deprecated; the component renders a complete multi-pass pipeline. Mount in a sized parent. Pointer orbits the solid and changes the incident beam. The legacy to/accent props are deprecated; spectral colors come from optical dispersion.
| Property | Type | Notes / default |
|---|---|---|
interactive | boolean | false in the library; enabled in this preview |
fallback | ReactNode | Shown when the renderer is unavailable |
className / style | string / CSSProperties | Applied to the outer container |
View source on GitHubFree for commercial projects · MIT