CSS Liquid Glass Effect
An Apple-style liquid glass toolbar with light blur, boosted color and bright specular rims made from inset shadows.
<nav class="liquid-glass" aria-label="Quick actions">
<a href="#" aria-label="Home"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 11 12 4l9 7v9h-6v-6H9v6H3z"/></svg></a>
<a href="#" aria-label="Search"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg></a>
<a href="#" aria-label="Profile"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/></svg></a>
</nav>
.liquid-glass {
display: flex;
gap: 6px;
padding: 8px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
-webkit-backdrop-filter: blur(3px) saturate(180%) brightness(1.08);
backdrop-filter: blur(3px) saturate(180%) brightness(1.08);
box-shadow:
inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.75),
inset -1px -1px 0 rgba(255, 255, 255, 0.35),
inset 0 0 18px rgba(255, 255, 255, 0.25),
0 10px 30px rgba(0, 0, 0, 0.25);
}
.liquid-glass a {
display: grid;
place-items: center;
width: 46px;
height: 46px;
border-radius: 50%;
color: #fff;
transition: background 0.2s ease, transform 0.2s ease;
}
.liquid-glass a:hover {
background: rgba(255, 255, 255, 0.18);
transform: scale(1.06);
}
.liquid-glass a:focus-visible {
outline: 2px solid #fff;
outline-offset: 1px;
}
.liquid-glass svg {
width: 22px;
height: 22px;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
@media (prefers-reduced-motion: reduce) {
.liquid-glass a {
transition: none;
}
}
About this CSS Liquid Glass Effect
This CSS Liquid Glass Effect is 51 lines of pure CSS (1.1 KB) with no JavaScript and no dependencies. It uses transitions, transforms, box shadows and backdrop filters. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.
CSS features used
- transitions
- transforms
- box shadows
- backdrop filtersIncludes the -webkit- prefix for older Safari.
- filters
- CSS Grid
- Flexbox
- keyboard focus styles
- reduced-motion support
Customize it
The colors in this snippet. Search and replace them to match your brand:
#fff
How to use this liquid glass effect
- Copy the HTML and paste it where you want the element to appear.
- Copy the CSS into your stylesheet, or inside a
<style>tag. - Keep the
.liquid-glassclass name, or rename it in both places. Then tweak colors, sizes and timing to match your design. - Using React or Next.js? Change
classtoclassNamein the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).
Building with an AI tool?
“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.