Skip to content

Latest commit

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

<timer-days>

This component will display a countdown expressed in days, hours, minutes and seconds until a deadline date. More than one timer can be displayed at once.

Example:

<timer-days target-date="2017-11-20T16:40:00"></timer-days><br>
<timer-days target-date="2017-12-30T16:40:00"></timer-days><br>


You can specify the language in which the labels will be shown. By default they are in english, but you can use lang to choose between English (en), Spanish (es), French (fr), Italian (it), Portuguese (pt) or German (de).

Example:

<timer-days target-date="2017-11-20T16:40:00"></timer-days><br>
<timer-days target-date="2017-11-20T16:40:00" lang="es"></timer-days><br>
<timer-days target-date="2017-11-20T16:40:00" lang="fr"></timer-days><br>
<timer-days target-date="2017-11-20T16:40:00" lang="pt"></timer-days><br>
<timer-days target-date="2017-11-20T16:40:00" lang="it"></timer-days><br>
<timer-days target-date="2017-11-20T16:40:00" lang="de"></timer-days><br>


It is also posible to set the text to be displayed before and after the proper countdown, by using the before and after properties.

Example:

<timer-days target-date="2018-11-20T16:40:00" before="Your planet will be destroyed in about"></timer-days><br>
<timer-days target-date="2018-11-20T16:40:00" after="until it finds you"></timer-days><br>
<timer-days target-date="2018-11-20T16:40:00" before="You still have" after="before something very bad happens"></timer-days>

### Styling The following custom properties are available for styling:
Custom propertyDescriptionDefault
--timer-days-background-colorThe timer-days background-color#FFD54F
--timer-days-border-colorThe timer-days border-color#212121
--timer-days-font-colorThe timer-days font color#212121
--timer-days-hover-background-colorThe timer-days background-color when mouse is over it#4E342E
--timer-days-hover-border-colorThe timer-days border-color when mouse is over it#CFD8DC
--timer-days-hover-font-colorThe timer-days font color when mouse is over it#CFD8DC
--timer-days-font-description-sizeThe timer-days font size for the text before an after the timer15px
--timer-days-font-number-sizeThe timer-days font size for the numbers35px
--timer-days-font-text-sizeThe timer-days font size for the words explaining each number18px

About

A Polymer component to display a countdown expressed in days, hours, minutes and seconds until a deadline date.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages