Glassmorphism in production: build it right or skip it
Glass is beautiful on a mockup and fragile in production. A practical playbook on when frosted panels help, when they hurt, and how to layer the blur, the tint and the border so it stays readable and fast.
7 min read
Glass is a lighting trick, not a layout
Frosted glass works when it sits on something busy — a photo, a video, a gradient. On a flat white background it reads as dirty gray. The entire trick is contrast: blur the chaos behind, keep the text crisp in front, and let the backdrop do the work.
The recipe, in order of importance
- Blur — backdrop-filter: blur(16–24px). Too little looks smudged, too much looks milky. 16–20px is the sweet spot.
- Tint — a translucent fill (white 6–10%) that lifts the panel off the backdrop. Skip it and you get floating text, not a card.
- Border — 1px rgba(255,255,255,0.2). This is what makes it read as glass instead of a screenshot.
- Depth — a soft outer shadow, 20–40px, so the panel floats rather than floats in.
- Reduced motion — disable the blur entrance animation under prefers-reduced-motion.
If you can't see the background move behind the panel, you've built a sticker, not glass.
Components that nail the technique
✦Glass NavbarA frosted nav that stays readable over scrolling content.✦Card Flip 3DDepth on hover without a single backdrop-filter.When the background is static or flat, skip the glass and reach for a solid surface or a subtle gradient instead — it will load faster and read cleaner.