che-react-number-easing
Advanced tools
React component for fancy transition for numbers.
Weekly downloads
Readme
React component for fancy number transitions.
npm i -S che-react-number-easing
const NumberEasing = require('che-react-number-easing');
<NumberEasing
ease="quintInOut"
precision={2}
speed={300}
trail={true}
useLocaleString={true}
value={15}
/>
[ease]
: The easing equation for the animation.
quintInOut
(You can choose from mattdesl/eases.)string
[precision]
: How many decimal places you want to show?
2
number
[speed]
: How fast do you want to finish the animation?
500
(ms)number
[trail]
: Do you want trailing zeroes?
false
boolean
[useLocaleString]
: Use number formatting based on locale?
false
boolean
[value]
: The value that you want to display at the end of the animation.
Required
number
If you want to build this from source, you will need babel and less.
npm install
And run the pre publish script
npm run prepare