Glass for the web.
One SVG filter bends the pixels behind each surface. A rounded-rectangle normal map — built on a canvas from a signed-distance field — tells feDisplacementMap how far to push the backdrop at every point: hard at the rim, flat in the middle, like a real convex lens. Three passes at slightly different scales split the light into a chromatic fringe. Drag the lens, tune it, then meet a kit of components built on the same surface.
The component kit
Every control below is the same GlassSurface at a different size — each generates its own displacement map and refracts the wallpaper underneath it. Interact with any of them.
Core primitive: <feImage> supplies the generated map, <feDisplacementMap> bends the backdrop by it (R→x, G→y). Maps are rebuilt only when a surface changes size, never when it just moves — so dragging stays cheap. Refraction renders in Chromium; Safari/Firefox fall back to a frosted blur with the same rim light.