Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 1.17 KB

README.md

File metadata and controls

30 lines (25 loc) · 1.17 KB

Ripple

Material design ripple effect.

How to use

Import from a CDN:

<script src="https://cdn.jsdelivr.net/gh/explosion-scratch/ripple/ripple.js">

Then use it like this:

<button data-ripple>Test</button>

Then call ripple():

ripple();

Options:

You can also use other attributes to change the way the rippl effect looks:

Attribute What it does Default
data-ripple Turns on the ripple effect -
data-time The time in milliseconds that the ripple effect takes. 500
data-color The color of the ripple. currentColor
data-opacity The opacity of the ripple effect. .3
data-event The event to ripple on. mousedown