A Basic CountDown Component
This project forked from rc-progress, which is awesome
yarn install react-countdowner
import {CountDowner} from 'react-countdowner';
export default () => (
<CountDowner countFrom={10} />
);
Name | Type | default | description |
---|---|---|---|
countFrom | number (seconds) | 0 | Which number to count down. |
isStart | boolean | true | You can control the start and stop state of the timer |
startsIn | number (seconds) | 0 | It means when the timer will start. Note that "isStart" must be true if you want to use it. |
size | number | 450 | Width and height of the timer |
onFinish | () => void |
null | triggers when timer finished |
onTick | (interval: number, percent: number) => void |
null | It triggers on every tick of the timer. |
rc-progress, react-countdowner is released under the MIT license.