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
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 / Attribute | Description |
|---|---|
.vd-ripple | Adds click-spawned ripple. Works on buttons, links, cards. |
data-vd-ripple | Attribute equivalent of `.vd-ripple`. |
data-vd-ripple-color | Override the ripple color (any CSS color value). |
--vd-ripple-duration | CSS custom property for animation length (framework default `0.6s`). |
data-vd-ripple-centered | Force 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: reduceand skips the animation when set. - Ripples carry
aria-hidden="true"so screen readers ignore them.