Skip to content

No.26 · Buttons

Ripple Rim Button

A nudge you can see go out: pressing sends a wave from the spot you touched running both ways round the button's rim, fading as it travels.

The prompt

The design brief behind this component — reuse it to regenerate, remix, or explain it.

Build a 'Nudge Hamza' button whose outline is an SVG path of a pill, sampled every ~3px from the measured size, with an outward normal at each sample. At rest it's a face with a 1.5px frost rim. On press, find the rim sample nearest the pointer (from the keyboard, use the top centre) and run a wave from it both ways round the rim: each frame, displace every sample along its normal by amp · gaussian((distance round the rim − front) / width) · cos(phase), where the front moves at the rim's length per 0.9s and amp decays from 5.5px with a 0.42s time constant. After 1.4s it settles back to the plain outline. At the same time the label becomes '✓ Nudged' in green and the rim turns green for 2.4s, announced politely. Reduced motion skips the wave but keeps the confirmation.

Notes

Interaction
Press to nudge; a wave runs round the rim from where you pressed.
Motion
Wave travels round the rim in 0.9s with exponential decay; done state holds 2.4s.
Accessibility
A real button; the label change is in an aria-live region. Keyboard presses start the wave from the top. Reduced motion removes the wave.
Responsive
The rim is resampled from the measured size, so any label fits.

Featured

301 components