1.1.0 • Published 3 years ago

react-date-countdown-timer v1.1.0

Weekly downloads
441
License
MIT
Repository
github
Last release
3 years ago

react-date-countdown-timer

npm version

A basic react countdown timer component with a cool CSS transition animation.

demo

You can see a demo app where you can play with props from here

Installation

npm install --save react-date-countdown-timer

Usage

import DateCountdown from 'react-date-countdown-timer';
// ...
return <DateCountdown dateTo='January 01, 2023 00:00:00 GMT+03:00' callback={()=>alert('Hello')}  />;

Properties

  • dateTo(string)(required): target date to countdown
  • dateFrom(string): date to start counting down (for passing server date etc.)
  • callback(function): function to run after the countdown is completed (default null)
  • mostSignificantFigure(string): most significant figure to show about the remaining time (default 'none')
  • numberOfFigures(number): number of figures to show from mostSignificantFigure (default 6)
  • locales(array(string)): locales strings for units (default 'year','month','day','hour','minute','second')
  • locales_plural(array(string)): locales strings for units' plural form (default 'years','months','days','hours','minutes','seconds')
  • noAnimate(bool): whether to animate the countdown or not (default false)

mostSignificantFigure can be one of these values:

  • year
  • month
  • day
  • hour
  • min
  • sec
  • none (shows as many figures as available)
1.1.0

3 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.4

4 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago