November 24, 202613 min read

Glassmorphism: What It Is, CSS Code and Examples

Glassmorphism explained: copy-ready CSS code, a live demo, examples from Apple and Raycast, generators and how it differs from Apple's Liquid Glass.

Topics

As of: 24 November 2026

Glassmorphism is a design style in which surfaces look like frosted glass: semi-transparent, with a blurred background, a fine light edge and a soft shadow. On the web, the effect is created with the CSS property backdrop-filter, which 97% of browsers support today. Since Apple introduced Liquid Glass in 2025, the style is everywhere again. Here you'll find copy-ready CSS code, a live demo, real examples, good generators and the rules that keep glass from costing you readability.


TL;DR: The essentials in 60 seconds

  • What it is: Semi-transparent surfaces with blur behind them. The name was coined by the designer Michał Malewicz (Hype4 Academy), and the style became popular with macOS Big Sur in 2020 (Interaction Design Foundation).
  • The code: A semi-transparent background plus backdrop-filter: blur(). Supported by 97.25% of browsers, Safari from version 18 without a prefix (caniuse).
  • Liquid Glass is more than blur: Apple's material bends and concentrates light instead of just scattering it (Apple Developer, 2025).
  • The risk is contrast: Too little contrast is the most common accessibility error on the web, found on 83.9% of the home pages analysed (WebAIM, 2026).
  • The rule: Glass for navigation, overlays and individual cards, never for body text over busy images.

What is glassmorphism?

Glassmorphism describes surfaces that look like a piece of frosted glass laid over colourful content. You can tell there is something behind it, but only as a blur. This creates depth: the glass visibly sits on its own layer above everything else.

Four ingredients make up the effect:

  1. Transparency: The surface is only partly opaque, usually white or black at 10 to 30% opacity.
  2. Blur: The background behind the surface is blurred. This is the actual glass effect.
  3. A light edge: A fine, semi-transparent border simulates the light catching the edge of the glass.
  4. A soft shadow: It lifts the surface off the background.

The fifth, often forgotten ingredient is the background itself. Glass over a solid colour is invisible. Glassmorphism needs colour, shapes or images behind it.

Here is what the effect looks like live. On the left with enough blur over a calm background, on the right with too little blur over a busy pattern:

Live demo with a real backdrop-filter, rendered directly in your browser.

To cite

Glassmorphism is a UI style in which surfaces look like frosted glass: semi-transparent, with a blurred background, a fine light edge and a soft shadow. The term was coined by the designer Michał Malewicz, and the style became popular in 2020 with macOS Big Sur. On the web, the effect is created with the CSS property backdrop-filter, which according to caniuse is supported by 97.25 percent of browsers. Apple's Liquid Glass from 2025 goes a step further by bending and concentrating light instead of just scattering it. The biggest risk of the style is too little contrast: according to WCAG, text on glass must reach a ratio of at least 4.5:1.


Where does glassmorphism come from?

The effect is older than its name. In 2013, with iOS 7, Apple relied on "the use of translucency and motion" and on clearly separated layers (Apple Newsroom, 2013). In its Fluent Design System, Microsoft introduced the "Acrylic" material, a translucent texture made of background, blur, tint and fine noise (Microsoft Learn). Windows Vista was already playing with glass.

The name "glassmorphism" was coined by the designer Michał Malewicz, as he writes himself and as the Interaction Design Foundation confirms (Hype4 Academy, IxDF). The style had its breakthrough in 2020, when Apple released macOS Big Sur with lots of translucent surfaces. Around a year after the name appeared, Malewicz counted about 3,500 Dribbble designs tagged "glassmorphism".

The second wave came in 2025 with Apple's Liquid Glass. Since then, glass surfaces have been a big topic on the web again, as described in the article on web design trends 2027.


Glassmorphism with CSS: the code

This is the core you need for a glass card:

.glass {
  background: rgb(255 255 255 / 14%);
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgb(0 0 0 / 25%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
}

What each line does:

PropertyValueEffect
background14% whiteThe glass surface itself, only partly opaque
backdrop-filter: blur()16pxBlurs everything behind the element
backdrop-filter: saturate()160%Makes the colours look more vivid through the glass
border1px, 28% whiteThe light edge
box-shadowsoft, 25% blackLifts the glass off the background
-webkit-backdrop-filteras aboveOnly needed for Safari 9 to 17

Browser support: According to caniuse, backdrop-filter works for 97.25% of users worldwide, in Chrome from 76, Firefox from 103 and Safari from 18 without a prefix (caniuse). MDN has listed the property as Baseline since 2024 (MDN).

For older browsers, web.dev recommends a check with @supports and an opaque fallback instead of relying on polyfills (web.dev):

.glass {
  background: rgb(20 24 40 / 92%);
}

@supports (backdrop-filter: blur(1px)) {
  .glass {
    background: rgb(255 255 255 / 14%);
    backdrop-filter: blur(16px) saturate(160%);
  }
}

The most common mistake: The blur seems to do nothing. According to MDN, backdrop-filter only reaches as far as the nearest so-called backdrop root. Any parent element with filter, opacity below 1, mask, clip-path, mix-blend-mode or its own backdrop-filter creates one (MDN). If your glass isn't working, check the parent elements first.


Glassmorphism examples from the web

The best-known examples aren't spectacular glass worlds, but navigation bars that glide over the content as you scroll. For every example below, I checked in the browser that it actually uses backdrop-filter.

Raycast website: floating glass navigation bar over red stripes and a blurred headline
Raycast: The floating navigation blurs the headline behind it, blur(5px). Screenshot of raycast.com, 24 November 2026.
Apple website: semi-transparent navigation bar through which a colourful MacBook shows as a blur
Apple: The main navigation uses saturate(1.8) blur(20px), and the colours underneath show through. Screenshot of apple.com, 24 November 2026.
Apple Vision Pro: a man wearing the headset sees floating app icons and glass panels in his living room
Glass as an entire operating system: visionOS lays translucent surfaces over the real room. Screenshot of apple.com/apple-vision-pro, 24 November 2026.

Other sites with glass navigation include linear.app with blur(20px) over the dark header and tailwindcss.com, which uses glass for individual cards. You'll find more inspiration for modern websites in the examples overview in the article on web design trends 2027.


Glassmorphism generators

If you don't want to experiment by hand, use a generator. You set the values with sliders and copy out the finished CSS code.

Glassmorphism generator by Hype4 Academy with sliders for blur, refraction and depth and copyable CSS code
The generator by Michał Malewicz, who coined the term. Screenshot of hype4.academy, 24 November 2026.
GeneratorWhat it doesWho it's for
Hype4 AcademyBlur, refraction and depth via sliders, copyable CSSDesigners who want the original look
W3SchoolsBlur, transparency, saturation, border and tintBeginners
shadcn.ioPresets, contrast estimate, export as CSS or Tailwind classesDevelopers using Tailwind

Glassmorphism vs. Liquid Glass

In June 2025, Apple introduced Liquid Glass, a new material for all of its operating systems. According to Apple, it "behaves like glass in the real world", reflecting and refracting its surroundings (Apple Newsroom, 2025). In the developer session on Liquid Glass, Apple explains the difference from previous materials: those "scattered light", while the new material "dynamically bends, shapes, and concentrates light in real time" (Apple Developer, WWDC25).

GlassmorphismLiquid Glass
EffectBlurs the background like frosted glassBends and concentrates light like a lens
Implementation on the webCSS backdrop-filter, in 97% of browsersSVG filters or WebGL, complex
AdaptationStaticContinuously adapts to the content
SinceTerm around 2020, effect much olderJune 2025
Liquid Glass Precision Lens web demo: a glass lens distorts text and a photo of a frog
Liquid Glass recreated in the browser, with SVG filters instead of backdrop-filter. Screenshot of winaviation.github.io/liquid-glass-demo, 24 November 2026.

The criticism came quickly. The Nielsen Norman Group wrote that usability suffers in iOS 26: text on top of text becomes an illegible jumble, and Apple puts spectacle above usability (Nielsen Norman Group, 2025). In October 2025, Apple responded with a "Tinted" setting, first in the iOS 26.1 beta, which makes Liquid Glass more opaque and increases contrast (MacRumors, 2025). For the web, this means: if you want the Liquid Glass look, take the lesson on board at the same time.


Accessibility and performance

Glass looks good, but it comes with two real risks.

Contrast. According to WCAG 2.2, text must reach a contrast ratio of at least 4.5:1, large text 3:1 (W3C). With glass, that is difficult, because the background changes as you scroll. Low contrast is already the most common error on the web: in 2026, WebAIM found it on 83.9% of the one million most visited home pages (WebAIM, 2026). The Nielsen Norman Group therefore recommends (Nielsen Norman Group, 2024):

  • checking contrast across the entire surface, not just in one spot
  • using more blur rather than less, especially over detailed backgrounds
  • simplifying the background behind the glass
  • giving users a way to reduce transparency

For the last point, there is the prefers-reduced-transparency media query. According to caniuse, however, it only reaches 76% of users, and Safari does not support it yet (caniuse). So don't rely on it alone: plan the contrast from the start so that it is sufficient without the query.

@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: rgb(20 24 40 / 92%);
    backdrop-filter: none;
  }
}

Performance. web.dev warns that backdrop-filter can hurt performance and advises testing the effect before going live (web.dev). A well-known example is a bug report at Mozilla that has been open for years: scrolling on apple.com is noticeably less smooth in Firefox for Android than in Chrome because of backdrop-filter (Mozilla Bugzilla). Many large glass surfaces that move while scrolling therefore cost noticeable processing power, especially on budget smartphones.


When is glassmorphism worth it?

UseA good fit?Why
Fixed navigation while scrollingYesThe content stays visible, the navigation remains readable
Modals and overlaysYesThe glass shows that the content behind is still there
Individual cards over a gradientYesA background that is easy to control
Body text over photosNoThe contrast varies with every image
Entire pages made of glassNoBusy, hard to read, bad for performance
Forms and input fieldsWith cautionFields and labels need clear contrast

The rule of thumb: glass is a tool for layers, not for content. It shows what is in front and what is behind. Reading should happen on solid ground.


Frequently asked questions

What is glassmorphism?

Glassmorphism is a UI style in which surfaces look like frosted glass: semi-transparent, with a blurred background, a fine light edge and a subtle shadow. The term comes from the designer Michał Malewicz, who by his own account coined it. The style became popular after Apple used it widely in macOS Big Sur in 2020.

How do I create glassmorphism with CSS?

You need a semi-transparent background, for example background: rgb(255 255 255 / 15%), and backdrop-filter: blur(16px), plus a fine 1px edge in rgba white and a soft shadow. For Safari up to version 17, add -webkit-backdrop-filter. Important: there has to be something colourful behind the element, otherwise the effect is invisible.

Why isn't backdrop-filter working for me?

Usually for one of three reasons: the element has an opaque background, there is nothing with enough contrast behind the element, or a parent element creates its own backdrop root, for example through filter, opacity below 1, mask, clip-path or mix-blend-mode. According to MDN, the effect then only reaches as far as that element.

Which browsers support backdrop-filter?

According to caniuse, 97.25 percent of browsers worldwide support backdrop-filter. Chrome from version 76, Firefox from 103 and Safari from 18 without a prefix. Safari 9 to 17 need the -webkit-backdrop-filter syntax. MDN has listed the property as Baseline since 2024.

What is the difference between glassmorphism and Liquid Glass?

Glassmorphism blurs the background like frosted glass. Apple's Liquid Glass from 2025 bends and concentrates light like real glass and continuously adapts to the content behind it. Apple puts it this way: previous materials scattered light, while the new material dynamically bends, shapes, and concentrates light in real time. On the web, this can only be approximated with SVG filters or WebGL.

Is glassmorphism accessible?

Only with care. According to WCAG, text must reach a contrast ratio of at least 4.5:1, across the entire surface, even when the background changes while scrolling. The Nielsen Norman Group recommends more blur, calmer backgrounds and a way to reduce transparency. The prefers-reduced-transparency media query helps, but Safari does not support it yet.


Conclusion

Glassmorphism is back, this time with Apple's Liquid Glass as a tailwind and with a CSS property that practically every browser supports. Technically, the effect takes six lines to build. The real work is the design around it: a background that carries the glass, enough blur, tested contrast and glass only where it explains layers. Then it looks premium rather than trendy.

Glass that looks good and stays readable?

I design and build websites where effects like glassmorphism serve the content instead of covering it up, with tested contrast and fast loading times. In an initial call, we'll look at what fits your project. No obligation, the initial call costs you nothing.

Request a project

Sources

  1. Michał Malewicz, Hype4 Academy: Glassmorphism in 2021, undated, around 2021. hype4.academy

  2. Interaction Design Foundation: Glassmorphism, 9 December 2021, updated 8 April 2026. ixdf.org

  3. Apple Newsroom: Apple Unveils iOS 7, 10 June 2013. apple.com

  4. Microsoft Learn: Acrylic material, updated 2 October 2026. learn.microsoft.com

  5. caniuse: CSS backdrop-filter, accessed 24 November 2026. caniuse.com

  6. MDN Web Docs: backdrop-filter, updated 10 November 2026. developer.mozilla.org

  7. web.dev: Create OS-style backgrounds with backdrop-filter. web.dev

  8. Mozilla Bugzilla: Bug 1732817, Scrolling on apple.com is much less smooth on fenix than in chrome with backdrop-filter. bugzilla.mozilla.org

  9. W3C: Understanding Success Criterion 1.4.3: Contrast (Minimum), WCAG 2.2. w3.org

  10. WebAIM: The WebAIM Million: The 2026 report on the accessibility of the top 1,000,000 home pages, 2026. webaim.org

  11. Megan Brown, Nielsen Norman Group: Glassmorphism: Definition and Best Practices, 7 June 2024. nngroup.com

  12. Raluca Budiu, Nielsen Norman Group: Liquid Glass Is Cracked, and Usability Suffers in iOS 26, 10 October 2025. nngroup.com

  13. caniuse: prefers-reduced-transparency, accessed 24 November 2026. caniuse.com

  14. Apple Newsroom: Apple introduces a delightful and elegant new software design, 9 June 2025. apple.com

  15. Apple Developer: Meet Liquid Glass, WWDC25, June 2025. developer.apple.com

  16. Juli Clover, MacRumors: iOS 26.1 Beta 4 Lets Users Control Liquid Glass Transparency with New Toggle, 20 October 2025. macrumors.com