CSS Liquid Glass Effect

An Apple-style liquid glass toolbar with light blur, boosted color and bright specular rims made from inset shadows.

  • liquid glass
  • glassmorphism
  • apple
  • specular
  • toolbar
  • backdrop-filter
HTML
<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>
CSS
.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

Customize it

The colors in this snippet. Search and replace them to match your brand:

  • #fff

How to use this liquid glass effect

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .liquid-glass class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in 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.

Feedback