1.0.0 • Published 3 years ago
countdown-clock-web-component v1.0.0
countdown-web-component
Web Component to countdown to a certain date
Usage
- Install the package
npm install countdown-clock-web-component
- Include
dist/js/countdown.min.js
in your project. - Use in HTML:
<countdown-clock date='2021-10-04 09:30' format='${days} Days, ${hours} Hours, ${minutes} Minutes, ${seconds} Seconds, ${milliseconds} Milliseconds' ></countdown-clock>
Attributes
Name | Description |
---|---|
date | Date string when you are counting down to |
format | String to output. Use ${days} etc to replace with the values. Any omitted values will be added to the next lowest format. E.g if you leave out days, then hours will include the no. of days. |
Development
Clone the repo, and use npm run develop
to watch the js. npm run build
builds minified JS.
1.0.0
3 years ago