Ripple effects with just one line of code in javascript

how to implement ripple effects

Cris Fandino Jr. on Jan 28, 2021

Web UI is important it can attract more customers or users who will visit to your website. Adding effects to your website is really cool and attractive. In this post, I'm gonna show you how you can add ripple effects on your website with just one line of code.

Prerequisite

You can learn more about ripple effects if you visit the link

Install ripple-effects package in npm

$ npm i ripple-effects

or you can use unpkg

<script src="https://unpkg.com/ripple-effects"></script>

Usage

On browser

<button id="btn">Ripple</button>
<script>
  ripple('.btn')
</script>

You can view the demo here