KKCountdown - v2.0.0-Alpha (please don't use in production)
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 (
stringin ISO date format orDate object) - number (
number) of seconds to countdown
Options
| option | default | description |
|---|---|---|
textAfterCount |
'' (string) |
|
oneDayClass |
'' (string) |
|
displayDays |
true (bool) |
|
displayZeroDays |
true (bool) |
|
customClass |
'' (string) |
|
warnSeconds |
60 (number) |
|
warnClass |
'' (string) |
|
afterFinish |
(function) |
|
dayText |
day (string) |
|
daysText |
days (string) |
|
hourText |
hour (string) |
|
hoursText |
hours (string) |
|
minuteText |
: (string) |
|
minutesText |
: (string) |
|
secondText |
'' (string) |
|
secondsText |
'' (string) |
|
containerClass |
kkcd-container (string) |
|
secondsClass |
kkcd-seconds (string) |
|
minutesClass |
kkcd-minutes (string) |
|
hoursClass |
kkcd-hours (string) |
|
daysClass |
kkcd-days (string) |
|
secondsTextClass |
kkcd-seconds-text (string) |
|
minutesTextClass |
kkcd-minutes-text (string) |
|
hoursTextClass |
kkcd-hours-text (string) |
|
daysTextClass |
kkcd-days-text (string) |
