StealThis .dev

Glassmorphism

Frosted glass panels floating over colorful gradients — translucency, blur, and subtle borders define this aesthetic.

Open in Lab
html css javascript
Targets: JS HTML

Code

Glassmorphism

Glassmorphism transforms UI panels into translucent frosted-glass surfaces that appear to float above a vivid, blurred backdrop. The aesthetic was popularized by Apple’s macOS Big Sur and has since become one of the defining visual languages of modern app design. Its power lies in three layered properties: a semi-transparent background, a backdrop-filter: blur() that simulates frosted glass, and a thin luminous border along the top and left edges that catches the simulated light.

The technique demands a rich, colorful background — plain white or black behind the glass produces no effect. The background is typically an expansive gradient or a photographic image, with large blurred color blobs reinforcing the depth illusion. All content on the glass panels uses white or near-white text to maintain legibility against the variable underlying colors.

The visual hierarchy is light and airy: nothing has hard edges or heavy shadows. Depth is communicated through transparency levels — panels closer to the “front” are slightly more opaque, while receding elements become more transparent. Interaction states use subtle brightness and opacity shifts rather than color changes.

Key characteristics

  • Every surface is a glass panel: background: rgba(255,255,255,0.15) + backdrop-filter: blur(20px)
  • Borders are luminous, not structural: border: 1px solid rgba(255,255,255,0.25)
  • Background must be colorful and layered — decorative blurred circles reinforce the effect
  • All text is white or near-white; no dark text on glass
  • Shadows are soft glows (box-shadow: 0 8px 32px rgba(0,0,0,0.2)) — never harsh
  • Interaction uses brightness and opacity changes, not color swap

When to use

  • Login and onboarding screens where visual impact matters
  • Dashboard overlays and modal dialogs
  • Marketing landing pages with hero sections
  • Mobile app UI where translucency signals depth and layering