Back to Blog
Design
Published May 2026 · 5 min read

Premium Liquid Glassmorphism: Achieving Refined UI Frosting with SVG Filters and CSS

Glassmorphism is a popular design style that makes UI elements look like frosted glass. To take this further, we can create a 'Liquid Glass' effect that makes the glass border ripple and bend organically when you hover over it.

To build this, we first need to define an SVG filter in our HTML. This filter uses mathematical noise to distort whatever is behind it, creating the organic liquid shape:

<svg style="display: none">
  <filter id="glass-distortion">
    <feTurbulence
      type="fractalNoise"
      baseFrequency="0.001 0.005"
      numOctaves="1"
      seed="17"
    />
    <feDisplacementMap
      in="SourceGraphic"
      scale="150"
      xChannelSelector="R"
      yChannelSelector="G"
    />
  </filter>
</svg>

Next, we use CSS to layer the elements. We stack three layers on top of each other: the distortion effect, a white tint for frosting, and an inner shadow for realistic highlights:

.liquidGlass-wrapper {
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 6px rgba(0, 0, 0, 0.2);
}

.liquidGlass-effect {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(3px);
  filter: url(#glass-distortion);
}

.liquidGlass-tint {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
}

.liquidGlass-shine {
  position: absolute;
  inset: 0;
  box-shadow: inset 2px 2px 1px rgba(255, 255, 255, 0.5);
}

By using these simple HTML and CSS rules, we achieve a tactile, premium liquid glass look that adds rich depth and micro-animations to any modern website.