1.1.7 • Published 10 months ago

@erichsia7/ripple v1.1.7

Weekly downloads
-
License
-
Repository
github
Last release
10 months ago

Ripple.js

npm unpkg

Install

  1. CDN (Content Delivery Network)
<script src="https://unpkg.com/@erichsia7/ripple@latest/dist/index.min.js"></script>
  1. npm
const ripple = require('@erichsia7/ripple')

Notice that you need to transpile it from TypeScript to native JavaScript (es6) to ensure that browser can conduct it.

Usage

ripple.addTo(selector, color, duration, callback)

Selector

Selector is a query selector string like .button, .container .button, or .button,.button2[attribute="1"].

Color

Color can comes in any format that is supported by browser like #000000, rgba(0, 0, 0, 0.5), or var(--custom-css-variable).

Duration

Duration is a time parameter for animation of a ripple effect, and it's measured in million seconds.

Callback

Callback is a function that you want to execute when the animation end. If it has a selector including multiple elements, you need to use an array to load up all the functions like [ function() {/*...*/}, function() {/*...*/} ].

Demo

Live demo

1.1.7

10 months ago

1.1.6

10 months ago

1.1.5

10 months ago

1.1.4

10 months ago

1.1.3

10 months ago

1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago