Liquid glass that works everywhere

An agent skill and npm package that builds, ports and audits liquid glass on every browser and five native stacks.

Install it Try the playground

You're seeing: frost

One glass, four tiers

Each element gets the best tier its browser and its reader allow. Switch the glass above to see what other people get.

Only Chromium can refract whatever is behind an element. Safari refracts a copy of a background you name, and gets frost without one. Firefox gets frost.

Playground

Drag the glass, or focus it and use the arrow keys. Change the controls and copy the code that matches.

Regular glass Frosted, and filled enough to carry text.
Editing
40px
100px
1.5
0.4px
1.6
0.6
-60°
75px
HTML
JavaScript

Can people read it?

Check text on a glass fill over every background it can meet. This is the same math the command line uses.

0.55

    Every platform

    Native glass where it exists, and a readable fallback where it doesn’t. These APIs move fast, so each guide links to its sources.

    Web

    <link rel="stylesheet" href="glass/glass.css">
    <nav class="glass" data-glass>...</nav>
    <script src="glass/glass.js"></script>
    <script>GlassEverywhere.watch(GlassEverywhere.auto());</script>

    glass.js picks the tier, and glass.css styles all four. Full Web guide

    SwiftUI

    if #available(iOS 26, macOS 26, *) {
        label.padding().glassEffect(.regular, in: .capsule)
    } else {
        label.padding().background(.ultraThinMaterial, in: .capsule)
    }

    iOS 26 glass, with a material where it isn’t available. Full SwiftUI guide

    React Native

    <LiquidGlassView
      effect="regular"
      style={[
        { padding: 16, borderRadius: 24 },
        !isLiquidGlassSupported && { backgroundColor: "rgba(255,255,255,0.86)" },
      ]}
    >

    Native glass on iOS 26, and a readable background everywhere else. Full React Native guide

    Flutter

    LiquidGlassLayer(
      settings: LiquidGlassSettings.ios27Regular(
        brightness: MediaQuery.platformBrightnessOf(context),
      ),
      child: LiquidGlass(
        shape: const LiquidRoundedSuperellipse(borderRadius: 28),
        child: controls,
      ),
    )

    liquid_glass_renderer is experimental, so pin its version. Full Flutter guide

    Compose

    Modifier.drawBackdrop(
        backdrop = backdrop,
        shape = { RoundedCornerShape(28.dp) },
        effects = {
            vibrancy()
            blur(4.dp.toPx())
            lens(16.dp.toPx(), 32.dp.toPx())
        },
        onDrawSurface = { drawRect(Color.White.copy(alpha = .55f)) },
    )

    Blur needs Android 12 and lens needs Android 13, so always draw a fill. Full Compose guide

    Install

    Agent skill

    For Claude Code, Codex, Cursor, OpenCode and more:

    npx skills add AryanPatil5/glass-everywhere

    Or as a Claude Code plugin:

    /plugin marketplace add AryanPatil5/glass-everywhere
    /plugin install glass-everywhere@glass-everywhere

    Or copy skills/glass-everywhere from the repo into ~/.claude/skills/ or your agent’s skills folder. Then ask for liquid glass.

    npm

    The web implementation, a React component and the command line tool:

    npm i glass-everywhere

    CDN

    Two tags, no build step:

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glass-everywhere@0.1.0/skills/glass-everywhere/scripts/glass.css">
    <script src="https://cdn.jsdelivr.net/npm/glass-everywhere@0.1.0/skills/glass-everywhere/scripts/glass.js"></script>

    What the audit catches

    One command, 15 rules. Each finding has a file, a line and a fix.

    $ npx glass-everywhere audit .
    
    error  style.css:2  compat/svg-backdrop-only
           backdrop-filter: url() only renders in Chromium, and this rule has no fallback, so Safari and Firefox show no glass.
           Fix: Put a blur() backdrop-filter in this rule and switch to url() only for Chromium, or let glass.js pick the tier.
    
    error  app/Glass.kt:4  compose/lens-shape
           lens() needs a CornerBasedShape. It throws at runtime for this shape.
           Fix: Use RoundedCornerShape, CircleShape or another CornerBasedShape, or drop lens() for this shape.
    
    warn   many.css:1  a11y/reduced-transparency
           Glass is used, but nothing handles prefers-reduced-transparency.
           Fix: Add @media (prefers-reduced-transparency: reduce) with an opaque background and no backdrop-filter. Safari lacks this query, so offer an in-app switch too.
    
    warn   app/View.swift:7  swiftui/missing-container
           2 glassEffect calls without a GlassEffectContainer. Glass can't sample other glass, so neighbours look wrong and cost more.
           Fix: Wrap views that sit together in GlassEffectContainer(spacing:).
    
    2 errors, 6 warnings, 7 info (7 files scanned)

    Browsers

    compat/svg-backdrop-only
    SVG refraction with no fallback in the same rule
    compat/webkit-prefix
    Missing -webkit- prefix for Safari before 18

    People

    a11y/reduced-transparency
    Reduced transparency handled nowhere
    a11y/forced-colors
    Forced colors handled nowhere
    a11y/white-text-on-glass
    White text on a glass surface

    Speed

    perf/large-blur
    Backdrop blur over 40px
    perf/too-many-surfaces
    More than 12 glass surfaces
    perf/animated-map-size
    Animated size on a displacement map

    SwiftUI

    swiftui/missing-container
    Several glass views without a container
    swiftui/too-many-prominent
    More than two prominent buttons
    swiftui/clear-legibility
    Clear glass that may need dimming
    swiftui/availability
    No iOS 26 check

    Other stacks

    react-native/no-fallback
    LiquidGlassView with no support check
    flutter/experimental
    Experimental renderer in use
    compose/lens-shape
    lens() on a shape that throws

    Credit where it’s due

    Every line here was written from the physics: Snell’s law, worked out for light entering the curved edge of a piece of glass.

    Liquid Glass is Apple's design language. This project is not affiliated with or endorsed by Apple.