Skip to content

No.31 · 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

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

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): Dusk scene: #140c1d behind blobs of coral #ff7a59, violet #8b5cf6 and gold #f5c26b. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. 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 behavior: Intrinsic width; the displacement map is drawn at the measured size. Touch: Ripples from your finger on tap. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

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.