Ripple

Material-style click ripples with zero JavaScript cost for the consumer. Drop vd-ripple on any element and the framework spawns a radial fill from the click point, animates it outward, and cleans up. Custom color and duration are first-class via attributes and CSS variables.

Buttons & Cards
1500

Sets --vd-ripple-duration on this demo (1.5s). Default here is 1500 ms — about 2.5× the framework’s 600 ms.

Click anywhere on this card
Engine wiring
API Reference
Class / AttributeDescription
.vd-rippleAdds click-spawned ripple. Works on buttons, links, cards.
data-vd-rippleAttribute equivalent of `.vd-ripple`.
data-vd-ripple-colorOverride the ripple color (any CSS color value).
--vd-ripple-durationCSS custom property for animation length (framework default `0.6s`).
data-vd-ripple-centeredForce the ripple to spawn at the element's center.
Accessibility
  • Ripples are purely decorative. The element's underlying click/keyboard semantics are unchanged.
  • The framework respects prefers-reduced-motion: reduce and skips the animation when set.
  • Ripples carry aria-hidden="true" so screen readers ignore them.