Skip to content

No.38 · Buttons

Droplet Button

A pill whose arrow is a drop of the button itself: hover and it pulls out of the end, stretching a neck that thins and snaps like water; click and it flies off while a new drop wells up.

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: Night

Build a pill button with its arrow in a round well at the right end. Draw the pill and a circular drop of the same colour together inside one layer filtered by an SVG goo filter: feGaussianBlur (stdDeviation 6) → feColorMatrix boosting alpha (22, −10) → feComposite atop the source. Shapes that are close melt into each other with a liquid neck. The drop starts inside the pill's end, under the arrow. On hover or focus, translate the drop and the arrow 3.75rem to the right on a springy curve (720ms, cubic-bezier(0.34,1.35,0.64,1)). The goo filter stretches a neck between pill and drop, thins it and snaps it, leaving the drop hanging just beside the pill with the arrow inside. On leave it drifts back more slowly (900ms) and merges. The button reserves room on the right so the drop is always inside its hit area. On click, the drop accelerates away (+5rem, shrinking and fading), then a new drop wells up from the pill's end (scale 0.2 → 1) and pulls out again. Selected variant — Night (night): Palette for this theme (Night): --droplet-fill #efe8dc; --droplet-focus #efe8dc; --droplet-ink #141216. Treat these as the root colour tokens, one value per role, and name them to suit your code. Select it with the theme option set to "night". Keep every dimension, spacing value, state and motion from the brief unchanged, and keep text at 4.5:1 contrast or better on these surfaces. 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: Hover or focus to pull the drop out; leave to let it merge back; click to send it off. Motion: Pull-out 720ms spring; merge 900ms ease; click sequence 980ms. Accessibility: A real button whose text is its label; the drop, pill and arrow are aria-hidden decoration. Focus pulls the drop out and rings the pill. Reduced motion keeps the drop still. Responsive behavior: Intrinsic width from its label, with fixed room for the drop on the right. Touch: A tap sends the drop off; there's no hover state. 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
Hover or focus to pull the drop out; leave to let it merge back; click to send it off.
Motion
Pull-out 720ms spring; merge 900ms ease; click sequence 980ms.
Accessibility
A real button whose text is its label; the drop, pill and arrow are aria-hidden decoration. Focus pulls the drop out and rings the pill. Reduced motion keeps the drop still.
Responsive
Intrinsic width from its label, with fixed room for the drop on the right.
On touch
A tap sends the drop off; there's no hover state.