0.1.7 โ€ข Published 3 years ago

emoji-claps v0.1.7

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

What's new?

Yes, you can click and hold to increase the number. Try it on Codepen!

Installation

$ yarn add emoji-claps // ES module

or in browser

<script src="https://unpkg.com/emoji-claps/dist/emoji-claps.umd.js"></script>
<!-- It's umd bundle-->

Polyfill

The animation use Element.animate method and effect.target, it's fancy and imperative but not fully support for low version browser & Safari, so please run the web-animation next polyfill before initial.

<script src="https://rawgit.com/web-animations/web-animations-js/master/web-animations-next-lite.min.js"></script>

Usage

<emoji-claps 
             emoji="๐Ÿ‘" 
             currentcount="30" 
             maxcount="50" 
             bullets='["๐Ÿ˜","๐ŸŽ‰","๐Ÿ”ฅ","๐Ÿ˜†"]' 
             bulletcount="6" 
             prefix="+"
             ></emoji-claps>

Event

full

The full event will trigger when currentcount === maxcount.

Take an example

const emojiClaps = document.querySelector('emoji-claps');
emojiClaps.addEventListener('full',e=>{
  // Do something if currentcount is 50 (maxcount)
})

click

The click event will trigger when user click emoji-claps.

Take an example

const emojiClaps = document.querySelector('emoji-claps');
emojiClaps.addEventListener('click',e=>{
  // Do something track after user click
})

LICENSE MIT ยฉ 2019 realdennis

0.1.7

3 years ago

0.1.5

3 years ago

0.1.4

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.3

5 years ago

0.0.4

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago