1.0.3 • Published 2 years ago

@critick/astimer v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

ASTimer :alarm_clock:

What is this?

ES6 countdown timer to show how many days, hours, minutes and seconds left to your deadline date.

Installation

  1. First of all, install this package as usually:
npm i @critick/astimer
  1. Add correct HTML structure for your timer (don't forget to set data-attributes - the date of your deadline):
<div class="timer" data-year="2022" data-month="12" data-day="31"></div>
  1. Import ASTimer to your JS file from node_modules:
import ASTimer from '@critick/astimer'
  1. Pass your HTML timer's CSS selector to ASTimer constructor:
const t = new ASTimer('.timer')
  1. All is set, you are awesome! :smile::+1: