1.0.3 • Published 2 years ago
@critick/astimer v1.0.3
ASTimer :alarm_clock:
What is this?
ES6 countdown timer to show how many days, hours, minutes and seconds left to your deadline date.
Installation
- First of all, install this package as usually:
npm i @critick/astimer
- 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>
- Import
ASTimer
to your JS file fromnode_modules
:
import ASTimer from '@critick/astimer'
- Pass your HTML timer's CSS selector to
ASTimer
constructor:
const t = new ASTimer('.timer')
- All is set, you are awesome! :smile::+1: