2.0.2 • Published 7 years ago

kk-countdown v2.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

KKCountdown - v2.0.0-Alpha (please don't use in production)

npm package Travis Coverage Status

KK Countdown counts down to specific dates in the future.

Installation / Download

NPM

COMING SOON

Import

ES6:

import KKCountdown from 'kkcountdown';

Examples

const countdown = new KKCountdown();
countdown.container = document.getElementById('app-1');
countdown.countTo = '2017-12-12T14:33:00.00';
countdown.start();

container - HTML element where coutdown should be placed

countTo - You can set here:

  • date (string in ISO date format or Date object)
  • number (number) of seconds to countdown

Options

optiondefaultdescription
textAfterCount'' (string)
oneDayClass'' (string)
displayDaystrue (bool)
displayZeroDaystrue (bool)
customClass'' (string)
warnSeconds60 (number)
warnClass'' (string)
afterFinish(function)
dayTextday (string)
daysTextdays (string)
hourTexthour (string)
hoursTexthours (string)
minuteText: (string)
minutesText: (string)
secondText'' (string)
secondsText'' (string)
containerClasskkcd-container (string)
secondsClasskkcd-seconds (string)
minutesClasskkcd-minutes (string)
hoursClasskkcd-hours (string)
daysClasskkcd-days (string)
secondsTextClasskkcd-seconds-text (string)
minutesTextClasskkcd-minutes-text (string)
hoursTextClasskkcd-hours-text (string)
daysTextClasskkcd-days-text (string)