react-animated-numbers
Library showing animation of number changes in react.js
Props
name | type | default | description |
---|---|---|---|
animateToNumber | number | none | Number to be animated |
fontStyle | React.CSSProperties? | none | Style of number text |
includeComma | boolean? | false | Whether the number contains commas |
onStart | (): void? | undefined | Function executed when animation is started |
onFinish | (): void? | undefined | Function executed when animation is finished |
configs | SpringConfig[]? | config.default | This module is using react-spring and you can refer to this config option. If you pass multiple settings, an animation is randomly assigned to each number. _ DO NOT USE duration because of a bug that hasn't been fixed yet_ |
Custom Style
- you can use className
animated-container
to style container (example) - if you want to customize font style. Just ues
fontStyle
prop