Skip to content

Glass Scene

Backdrop displacement needs one specific compositor, but a plain SVG filter on ordinary content works everywhere. A scene owns a backdrop and any number of lenses, bakes one displacement map — neutral except under each lens — and bends its own content in every modern browser. It activates in the frost engine and stays inert in the refract engine, where the surfaces already bend.

Install

$ pnpm dlx shadcn@latest add https://vitrumui.vercel.app/r/glass-scene.json

The scene activates in the frost engine, where backdrop displacement is unavailable; the refract engine already bends through the surfaces themselves.

Examples

Default

content you own

bends in any engine

API

<GlassSceneLens />

PropTypeDefaultDescription
depthnumber26Maximum bend at the rim, px.
bevelnumber30How far the bend reaches inward, px.
curvaturenumber1.6Bevel profile exponent — low is a soft shoulder, high a hard rim.
radiusnumberfrom chromeCorner radius override for the bend zone.
specularnumber0.35In-filter glint strength, 0–1.