react-number-counter-widget
v1.0.1
Published
react-number-counter-widget is react component use to add counter up animation for number-widget
Downloads
19
Readme
react-number-counter-widget
react-number-counter-widget is react component use to add counter up animation for number-widget
Demo (codesandbox) -> Demo
Installation
Use the package manager npm to install .
npm install react-number-counter-widget
Usage
import React from 'react';
import ReactDOM from 'react-dom';
import { NumberWidgetCounter } from '../NumberWidgetCounter';
ReactDOM.render(
<div>
<NumberWidgetCounter key={'111'} number={17000} useClass={''} timeMs={3000}/>
<NumberWidgetCounter key={'222'} number={50} useClass={''} timeMs={3000} />
</div>
,
document.getElementById('root'),
);
props| type | default value| info --- | --- | --- | --- number | number | undefined | Count up to this number useClass | string | undefined | Class name for the counter wrapper factor | number | 1 | Use To speed up/down counter timeMs | number | undefined | Used To finish counter in given time (approximately) stop | () => boolean | stop on given number | Use to change stopping counter condition
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.