Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

10up/component-countdown-timer

Repository files navigation

10up Countdown Timer component

DEPRECATED. Please go to https://github.com/10up/component-library

A countdown timer component that displays the amount of time remaining until (or elapsed since) the time specified in the component's datetime attribute.

Support Level License: MIT Build Status

Installation

npm install --save @10up/countdown-timer

View official documentation for this package

Markup

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:

<time class="countdown-timer" datetime="2046-01-01T00:00:00">
   <!-- Some fallback content, perhaps the date string itself or a message to users or machines that can't view this component with JS. -->
</time>

Usage

Create a new instance by supplying the selector to use for the component and an object containing any necessary callback functions.

import CountdownTimer from '@10up/countdown-timer';

new CountdownTimer( '.countdown-timer', {
	// Settings and callback properties go here.
} );

Demo

Example implementations at: https://10up.github.io/component-countdown-timer/demo/

Support Level

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.

Like what you see?

10up

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published