Skip to content
/ counter Public
forked from component/counter

Counter component (countdown flippy CSS thing)

Notifications You must be signed in to change notification settings

kudago/counter

 
 

Repository files navigation

Counter

Counter component.

js apple style countdown counter component

Installation

$ npm i component-counter

API

new Counter([element], [options])

Initialize a new counter on an optional element with optional options.

var Counter = require('component-counter');
var counter = new Counter();
document.documentElement.appendChild(counter.el);

Options

digitClass

A class to add to each digit.

digits

Initial digits number to create.

Counter.prototype.digits(n)

Set the total number of digits to n.

Counter.prototype.addDigit()

Add a digit element.

Counter.prototype.ensureDigits()

Ensure at least n digits are available.

Counter.prototype.updateDigit(i, val)

Update digit i with val.

Counter.prototype.update(n)

Update count to n.

License

MIT

About

Counter component (countdown flippy CSS thing)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 61.8%
  • HTML 22.8%
  • CSS 9.3%
  • Makefile 6.1%