A countdown timer component.
npm install @10up/countdown-timer> A countdown timer component that displays the amount of time remaining until (or elapsed since) the time specified in the component's datetime attribute.
npm install --save @10up/countdown-timer
View official documentation for this package
This is the markup template expected by the component. To count down to midnight on New Year's Day in the year 2046 in your local time zone:
``html`
Create a new instance by supplying the selector to use for the component and an object containing any necessary callback functions.
`javascript
import CountdownTimer from '@10up/countdown-timer';
new CountdownTimer( '.countdown-timer', {
// Settings and callback properties go here.
} );
``
Example implementations at: https://baseline.10up.com/component/countdown-timer/
Active: 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.