react-tick

0.1.3 • Public • Published

react-tick

Countdown timer for React

NPM version Downloads

react-tick

Installation

npm install react-tick

Usage

var React = require('react');
var Tick = require('react-tick');
var ReactDOM = require('react-dom');
ReactDOM.render(
    <Tick
        format="remain: {dd} days {hh} hours {mm} minutes {ss} seconds"
        endTime="2015/12/31 23:59:59"
        onTimeUp={onTimeUp} />,
    mountNode
);

Manifest

format

A string used to format the display string with some variables. HTML tags is supported.

  • dd remain days.
  • hh remain hours.
  • mm remain minutes.
  • ss remain seconds.

endTime

A string to indicate end time, the time format should be yyyy/MM/dd hh:mm:ss like 2012/12/31 23:59:59.

onTimeUp

A function will be executed when time is up.

License

MIT, see the LICENSE file for detail.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    3
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i react-tick

Weekly Downloads

3

Version

0.1.3

License

MIT

Last publish

Collaborators

  • superraytin