react-roll-up-count
v0.1.3
Published
[![npm version](https://badge.fury.io/js/react-roll-up-count.svg)](//npmjs.com/package/react-roll-up-count) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
Downloads
2
Readme
React Roll Up Count
This package is your goto solution for adding animated, interactive counters to your react applications. With just a single animation at the moment as we intend to make it more easier for you with different kinds of rollers and much more if you stay tuned.
Getting Started
These instructions will get you a copy of the project up and running on your local machine. Happily follow the steps and you're good to go
Installation
To install and set up the library, run:
$ npm install react-roll-up-count
Usage
Example:
import Roller from "react-roll-up-count"
const MyComponent = () => {
return (
<div className="App">
<Roller value={123456} />
</div>
);
};
Props
| Prop | Type | default values | | --- | --- | --- | | value | number | '' | | ref | refobject/optional | '' | | transitionDuration | number/optional | 0.5 | | className | string/optional | "" | | fontSize | string/optional | 40px | | height | string/optional | 40px | | width | string/optional | 20px |
className:
When you want to overide default styles, fonts etc....You can also decide to change height and width from the class here. When you use className, width height, margin and fontSize params will not be usefull anylonger, you have to supply them in your class.
height:
When you want to overide height of each digit. Should have the unit attach like px/em
width:
When you want to overide width of each digit. Should have the unit attach like px/em
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Add your changes:
git add .
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :sunglasses:
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Hussaini Bulama - Initial work - Hussaini
See also the list of contributors who participated in this project.
License
MIT License © Hussaini Bulama