Library that animates changes in numbers
npm install @moxorama/reanimated-numbers
import { AnimatedNumber } from '@moxorama/reanimated-numbers';
// ...
<AnimatedNumber
value={number}
fontSize={48}
duration={750}
format={new Intl.NumberFormat('en-US')}
/>
number
is the number to animate.fontSize
is the font size of the number.duration
is the duration of the animation in milliseconds.format
(optional) is the format of the number, by default there is no formatting.
lineHeight is fontSize * 1.2
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library