0.3.3 • Published 6 years ago

react-live-timer v0.3.3

Weekly downloads
20
License
ISC
Repository
github
Last release
6 years ago

Description

React Component for a live timer (Hourglass animation for countdown). Using this component will display an hourglass which you can start/pause/resume and which will countdown until given duration.

Usage

Installation :

npm install react-live-timer

Then

var Timer = require('react-live-timer');

...

render: function() {
  return (
  	<div>
  		<Timer  pageBgColor='white' id={1} duration={10} started={true} paused={false} />
  	</div>
  )
}

See Examples for more details.

API

Timer

NameTypeRequiredDefaultDescription
idnumberyes (only if more than one timer used)1HTML Element id is timerNo + id
startedbooleanyesN/ARepresents whether timer has started
pausedbooleanyesN/ARepresents whether timer is paused
pageBgColorstringyesN/AColor of background of page (Reqd. to make draw the hourglass)
outerColorstringno'white'Color of empty part of hourglass
innerColorstringno'grey'Color of sand part of hourglass
strokeColorstringno'black'Color of border of hourglass
sizenumberno10Size of hourglass
durationnumberno60Represents duration of timer (time until hourglass is empty) in seconds
onCompletefunctionnoundefinedCallback triggered when timer reaches countdown (hourglass becomes empty)

Contributions

There are still plenty of ways to improve this project. Any contributions are appreciated.

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago