Skip to content

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

License

Notifications You must be signed in to change notification settings

polymer-day/timer-days

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 property Description Default
--timer-days-background-color The timer-days background-color #FFD54F
--timer-days-border-color The timer-days border-color #212121
--timer-days-font-color The timer-days font color #212121
--timer-days-hover-background-color The timer-days background-color when mouse is over it #4E342E
--timer-days-hover-border-color The timer-days border-color when mouse is over it #CFD8DC
--timer-days-hover-font-color The timer-days font color when mouse is over it #CFD8DC
--timer-days-font-description-size The timer-days font size for the text before an after the timer 15px
--timer-days-font-number-size The timer-days font size for the numbers 35px
--timer-days-font-text-size The timer-days font size for the words explaining each number 18px

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 100.0%