Socket
Socket
Sign inDemoInstall

react-date-countdown-timer

Package Overview
Dependencies
6
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-date-countdown-timer

Date countdown timer component with a cool animaton for react.js


Version published
Weekly downloads
443
decreased by-10.51%
Maintainers
1
Install size
422 kB
Created
Weekly downloads
 

Readme

Source

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)

Keywords

FAQs

Last updated on 18 Oct 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc