No.32 · Buttons
Puddle Button
A glass capsule that behaves like a puddle: press it and a ring spreads from your fingertip, bending the scene behind the glass as it passes, then dies away.
The prompt
Written for the variant you picked above: Dusk
Build a liquid-glass pill (56px: faint white fill, backdrop blur and saturation, inner highlights, soft shadow) over a busy scene: blurred colour blobs with thin vertical white stripes (2px every 14px) so the bend is easy to see. On press, start a ripple at the exact press point. In Chromium, the ripple refracts the backdrop for real: an SVG filter applied with backdrop-filter: url(#ripple) blur(3px) saturate(1.7), made of feImage → feDisplacementMap. Every animation frame for 900ms, regenerate the feImage as an SVG data URL at the button's size: a neutral grey background (no displacement) plus a group masked to a soft ring of radius r around the press point (radial gradient: clear inside, opaque at r, clear outside) that holds a horizontal red gradient and a vertical blue gradient, both centred on the press point and blended with difference. The ring therefore pushes pixels radially. Grow r with an ease-out to the farthest corner and decay the displacement scale from −34 to 0. Everywhere, also expand a thin bright ring of light (inset box-shadows on a circle) from the press point, scaling 0 → the farthest corner and fading over 900ms. Where SVG backdrop filters aren't supported, that ring is the whole effect. Enter and Space ripple from the centre. Selected variant — Dusk: Dusk scene: #140c1d behind blobs of coral #ff7a59, violet #8b5cf6 and gold #f5c26b.
Notes
- Interaction
- Press anywhere on the glass to send a ripple out from that point.
- Motion
- Ring radius eases out over 900ms; displacement decays with it; the light ring fades over the same time.
- Accessibility
- A real button with its text as the label; the filter and ring are aria-hidden. Keyboard presses ripple from the centre. Reduced motion turns the ripple off.
- Responsive
- Intrinsic width; the displacement map is drawn at the measured size.
- On touch
- Ripples from your finger on tap.