Skip to content

No.362 · CTAs

Liquid Glass CTA

A newsletter sign-up held in a capsule of glass over slow drifting colour; the rim bends the colour behind it and catches the light at your pointer, and signing up squashes it like a drop.

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 closing newsletter section over a slow aurora: four big blurred blobs (blur 60px) drifting on unrelated 17–27s loops, plus faint vertical hairlines so refraction is visible. Centre a mono eyebrow, a balanced headline and a short line, then a capsule form (30rem, fully rounded) made of glass: a faint white gradient, backdrop blur and saturation, an inner top highlight, an inner ring and a soft lower glow. In Chromium, add edge refraction: measure the capsule and build an SVG displacement map at its exact size (red left→right and blue top→bottom gradients blended with difference, and a neutral grey pill inset 16px and blurred), then apply backdrop-filter: url(#lens) blur(2px) saturate(1.6) via feImage + feDisplacementMap (scale −48). A 1.25px rim, made with a content-box mask, carries a radial highlight positioned at the pointer. Inside: a transparent email input and a solid white pill button. Validate on submit with plain sentences ('That doesn't look like an email address…'). On success, the capsule squashes like a drop (1.05 × 0.86, springing back over 700ms) while the fields fade up and out and a single confirmation line fades in: 'You're in. The first letter reaches you@… on Sunday.' Selected variant — Dusk (dusk): palette="dusk": aurora blobs of coral #ff7a59, violet #8b5cf6, gold #f5c26b and pink #e0457b over #120b1c. 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: Move over the capsule and its rim catches the light where you are. Type an email and subscribe; errors are explained in a sentence. Motion: Aurora drifts on 17–27s loops; success squish 700ms spring; fields and confirmation crossfade 420ms. Accessibility: A labelled email field with autocomplete, aria-invalid and a polite message line that carries hints, errors and the confirmation. The submitted fields become inert. Reduced motion stops the aurora and the squish. Responsive behavior: The capsule shrinks to the column; the lens map is rebuilt for every size; the button tightens on small phones. Touch: The rim highlight rests at the top-left; everything else works by 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
Move over the capsule and its rim catches the light where you are. Type an email and subscribe; errors are explained in a sentence.
Motion
Aurora drifts on 17–27s loops; success squish 700ms spring; fields and confirmation crossfade 420ms.
Accessibility
A labelled email field with autocomplete, aria-invalid and a polite message line that carries hints, errors and the confirmation. The submitted fields become inert. Reduced motion stops the aurora and the squish.
Responsive
The capsule shrinks to the column; the lens map is rebuilt for every size; the button tightens on small phones.
On touch
The rim highlight rests at the top-left; everything else works by tap.