StealThis .dev

Ripple Effect

Expanding concentric ripple circles emanating from the click point on any surface, inspired by Material Design.

Open in Lab
css javascript vue svelte
Targets: TS JS HTML React Vue Svelte

Code

Ripple Effect

Beautiful expanding ripple circles that emanate from the exact click point on any surface. Multiple concurrent ripples supported, with smooth scale and fade-out animations.

How it works

  1. On click, a <span> element is created at the cursor’s position within the container
  2. CSS @keyframes scales the circle from 0 to full size while fading opacity
  3. The element self-destructs after the animation completes
  4. Multiple clicks create overlapping ripples for a layered water-drop effect

Customization

  • Ripple color and opacity
  • Animation duration and easing
  • Ripple size (auto-calculated from container dimensions or fixed)
  • Support for multiple concurrent ripples

When to use it

  • Button click feedback
  • Card interaction effects
  • Background click animations
  • Touch-responsive surfaces