Glassmorphism
A UI aesthetic combining translucent surfaces, background blur (backdrop-filter), and crisp hairline borders to mimic frosted glass
Table of Contents
Interactive Playground
Tap or drag to interact with the demoWhat is Glassmorphism?
A UI aesthetic combining translucent surfaces, background blur (backdrop-filter), and crisp hairline borders to mimic frosted glass. It is a core concept in Visual Styles within UI / UX.
Core Principles
Glassmorphism is a modern UI aesthetic popularized by macOS, iOS, and Windows Fluent Design. It relies on three coordinated CSS ingredients: a semi-transparent fill, a background blur (backdrop-filter: blur()), and a delicate 1px specular border that catches light along the panel's edge.
By letting colors and shapes bleed softly through from behind, frosted glass communicates Z-axis elevation and spatial context far more naturally than heavy drop shadows—helping users understand that a floating header, modal, or popover sits directly above their active workspace.
Practical Takeaways
- Protect text contrast (WCAG AA 4.5:1): Translucent panels easily fail legibility when scrolled over busy imagery. Keep surface opacity high enough to anchor typography, and pair
blur(16px)withsaturate(150%)so colors stay vibrant rather than muddy. - Respect GPU budgets: Real-time
backdrop-filterblurs are compositing-heavy. Reserve glass surfaces for a few elevated chrome layers (sticky headers, modals, command palettes) rather than applying them to 50 scrolling list cards. - Honor accessibility preferences: Support
@media (prefers-reduced-transparency: reduce)by falling back to high-contrast opaque surfaces for users who struggle with translucent overlays.
Notable Examples
- Apple iOS, macOS & visionOS: Uses layered vibrancy and frosted glass throughout Control Center, docks, and spatial windows.
- Windows 11 Fluent Design: Differentiates active windows and flyouts using Mica and Acrylic translucent materials.
- Modern SaaS & Dev Tools: Dark-mode sticky navbars and command bars use subtle
backdrop-blurand hairline borders to feel crisp and weightless.
Practical Code Snippet
Copy and drop straight into your project.glass-card { background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);}