Skip to content
IndexRequest a UIAboutContact

Glass Blur Depth

A glass card over moving colour shapes with blur, tint and edge-light controls and three presets.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Product UI render of a frosted glass card floating over three large soft colour orbs in coral, blue and violet, the orbs blurred smoothly where they pass behind the glass and sharp elsewhere, the card slightly white with a thin bright edge highlight along the top, white text Good morning and a small button on it, studio-soft light, depth and calm. Variants: clear glass with only a light blur, and milky glass with heavy blur and tint. Negative: muddy colours, hard shadows, text errors, device frames. Reduced motion: static image.

About this pattern

Definition

Glassmorphism puts a translucent, blurred panel over a colourful background. The blur radius sets how frosted it feels, the white tint sets how milky, and a thin bright border on the edge sells the thickness of the glass.

Purpose & UX principles

  • backdrop-filter: blur(Npx) saturate(1.4) blurs what is behind the panel.
  • A background of rgba white at 10 to 40 percent gives the tint.
  • A 1px border at 40 to 60 percent white acts as the glass edge.
  • Text on glass must still pass contrast; raise the tint or darken the text if not.

Interaction states

  • Three presets, Blur and Tint sliders and an Edge light checkbox; move the pointer to shift the shapes.

Motion specification

  • Shapes follow the pointer with a short ease.
  • Reduced motion: no easing.

Responsive behaviour

  • Fall back to a solid semi-opaque colour where backdrop-filter is unsupported.
  • Use blur sparingly; large blurred areas are expensive on low-end phones.

Code

HTML
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Preset"><button data-p="0" aria-pressed="true">Frosted</button><button data-p="1" aria-pressed="false">Clear</button><button data-p="2" aria-pressed="false">Milky</button></div><div class="sc" id="sc"><i class="o1"></i><i class="o2"></i><i class="o3"></i><div class="gl" id="gl"><b>Good morning</b><span>Three new updates</span></div></div><div class="two"><label class="rw">Blur <b id="bv">12px</b><input id="bl" type="range" min="0" max="30" value="12"></label><label class="rw">Tint <b id="tv">20%</b><input id="tn" type="range" min="0" max="60" value="20"></label></div><label class="sw"><input id="eg" type="checkbox" checked> Edge light</label></div>

Related patterns

Frosted Glass & Acrylic

↗
Frosted Glass & AcrylicSurfaces & Objects

Liquid Glass Button

↗
Liquid Glass ButtonGlass & Tactile

Magnifier Glass Lens

↗
Magnifier Glass LensGlass & Tactile