Skip to content

kodelrosario/react-count-to

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

React Count To

Animated counter component for React.js

Installation

$ npm install react-count-to --save

Demo

Live

http://react-count-to.herokuapp.com

Docker (thanks to Cirpo)

  • docker build -t react-count-to .
  • docker run -p 3000:3000 -it react-count-to
  • connect to http://localhost:3000 and enjoy

Usage

import CountTo from 'react-count-to';

<CountTo to={1234} speed={1234} />

Attributes

  • from (optional): Counting from (default: 0).
  • to: Counting to.
  • speed: Duration (in milliseconds).
  • delay (optional): Delay (in milliseconds) between each refresh (default: 100).
  • onComplete (optional): A callback triggered when counting is done.
  • digits (optional): The number of digits to appear after the decimal point (default: 0).
  • className (optional): HTML class attribute for counter element.
  • min (optional) Minimum value for counting to.

Test

$ npm test

About

Animated counter component for React.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 67.2%
  • HTML 32.8%