Press anywhere on the button and a ripple spreads from exactly that point, bright at the centre, fading as it reaches the far corner; quick taps leave quick rings, a held press keeps the ring until release. Works the same for mouse and touch.
On `pointerdown` a span is appended at the pointer offset with a diameter of 2 × the distance to the farthest corner, then scaled from 0 to 1 over 0.55 s. Opacity fades only on `pointerup`/`pointerleave` (0.4 s), so a held press keeps the ring full while it waits: the ripple's life is tied to the press, not a fixed time.
From prompt to a block in your page.
The preview is the shipped element inside a neutral demo page. Hover, click, focus: the one interaction it is about is live.
Token sets re-tint it live. The prompt carries the one you chose.
A paste-in snippet, or a component for Next.js, React, Vue, Astro, WordPress, Shopify or Webflow.
It quotes the markup, styles and script verbatim with the tokens and the rules that keep it self-contained.
It inherits your page's font and width; the tokens live on :root; several instances share one script.