1.3.0 • Published 3 years ago

react-countdowner v1.3.0

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

react-countdowner

A Basic CountDown Component

This project forked from rc-progress, which is awesome

Screenshot

react-counterdowner

Installation

yarn install react-countdowner

Usage

import {CountDowner}  from 'react-countdowner';

export default () => (
  <CountDowner  countFrom={10}  />
);

API

props

NameTypedefaultdescription
countFromnumber (seconds)0Which number to count down.
isStartbooleantrueYou can control the start and stop state of the timer
startsInnumber (seconds)0It means when the timer will start. Note that "isStart" must be true if you want to use it.
sizenumber450Width and height of the timer
onFinish() => voidnulltriggers when timer finished
onTick(interval: number, percent: number) => voidnullIt triggers on every tick of the timer.

License

rc-progress, react-countdowner is released under the MIT license.