https://github.com/superraytin/react-tick
Countdown timer for React
https://github.com/superraytin/react-tick
Last synced: about 1 year ago
JSON representation
Countdown timer for React
- Host: GitHub
- URL: https://github.com/superraytin/react-tick
- Owner: superRaytin
- License: mit
- Created: 2015-12-16T11:32:58.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-10T08:34:25.000Z (over 10 years ago)
- Last Synced: 2025-02-25T03:35:11.119Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-tick
> Countdown timer for React
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url]
[](https://npmjs.org/package/react-tick)
[npm-url]: https://npmjs.org/package/react-tick
[downloads-image]: http://img.shields.io/npm/dm/react-tick.svg
[npm-image]: http://img.shields.io/npm/v/react-tick.svg
# Installation
```
npm install react-tick
```
# Usage
```js
var React = require('react');
var Tick = require('react-tick');
var ReactDOM = require('react-dom');
ReactDOM.render(
,
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](/LICENSE) file for detail.