Skip to content
IndexRequest a UIAboutContact

Condensation Droplets

Mist, droplets and rain on glass generated from seeded random circles, with a density slider.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI CODING TOOL
Close-up photograph of a window pane covered in water droplets after rain, round beads of different sizes each with a small bright highlight and a darker rim, a blurred warm city of lights behind the glass, soft bokeh, cool blue-grey tones with orange glow, shallow depth of field, moody and calm. Variants: fine mist of tiny droplets, large sparse drops with a few running streaks. Negative: cartoon bubbles, uniform dots, text, heavy fog hiding the background, hands. Reduced motion: static image.

About this pattern

Definition

Water on glass shows up as many small round lenses. Each drop is a circle with a bright highlight at the top, a darker rim and a soft shadow; scattered at different sizes they read instantly as wet glass.

Purpose & UX principles

  • Each drop: radial gradient with a small white highlight, a mid tone that is almost transparent and a darker edge.
  • Vary size widely and keep a few tiny ones between big ones.
  • Use a fixed random seed so the layout is stable between loads.

Interaction states

  • Three types (Mist, Droplets, Rain) and a Density slider.

Motion specification

  • Drops fade in over 300ms when the settings change.
  • Reduced motion: drops appear without fading.

Responsive behaviour

  • Many small elements cost performance; keep the count under about 150.
  • Never put readable text under dense drops.

Code

HTML
<div class="bx"><div class="gl" id="gl"></div><div class="pre" id="pre" role="group" aria-label="Type"><button data-p="0" aria-pressed="true">Mist</button><button data-p="1" aria-pressed="false">Droplets</button><button data-p="2" aria-pressed="false">Rain</button></div><label class="rw">Density <b id="dv">60</b><input id="dn" type="range" min="10" max="150" value="60"></label></div>

Related patterns

Magnifier Glass Lens

↗
Magnifier Glass LensGlass & Tactile

Frosted Glass & Acrylic

↗
Frosted Glass & AcrylicSurfaces & Objects

Ceramic Glaze & Gloss

↗
Ceramic Glaze & GlossSurfaces & Objects