Countdown

npm npm

A really simple expiration meter.

Install

❯ yarn add animo-countdown

Use

import countdown from 'animo-countdown';

countdown(document.querySelector('.some-element'), { total: 90 })
  .then(function() {
    /* ... */
  })
  .catch(function(err) {
    /* ... */
  })

Default properties

{
  // Bar fill color
  color: '#ddd',
  // Amount that's already expired
  elapsed: 0,
  // Total before expiration
  total: 60
}

results matching ""

    No results matching ""