

Library showing animation of number changes in react native
source link: https://reactnativeexample.com/library-showing-animation-of-number-changes-in-react-native/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

react-native-animated-numbers
Library showing animation of number changes in react-native
If you want web version in react.js download react-animated-numbers
install
This package is using react-native-reanimated. So following libs should be installed first
yarn add react-native-reanimated react-native-gesture-handler && cd ios && pod install
yarn add react-native-animated-numbers
props
type default description animateToNumber number none Number to be animated fontStyle TextStyle? none Style of number text animationDuration number? 1400(ms) The speed at which the animation works includeComma boolean? false Whether the number contains commas easing Easing? Easing.elastic(1.2) React Native Easing API in Animatedexample
import React from 'react';
import {SafeAreaView, Button} from 'react-native';
import AnimatedNumbers from 'react-native-animated-numbers';
const App = () => {
const [animateToNumber, setAnimateToNumber] = React.useState(7979);
const increase = () => {
setAnimateToNumber(animateToNumber + 1999);
};
return (
<SafeAreaView
style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<AnimatedNumbers
includeComma
animateToNumber={animateToNumber}
fontStyle={{fontSize: 50, fontWeight: 'bold'}}
/>
<Button title="increase" onPress={increase} />
</SafeAreaView>
);
};
export default App;
screenshot
GitHub
Recommend
-
150
README.md
-
54
react-native-card-flip Card flip animation for React Native. Installation npm install --save react-native-card-flip Preview
-
57
Animations have a great impact on mobile to create better the user experience, they are mostly used to interact with user’s actions and that keeps the user more engaged with your app. In the technical side, Reac...
-
11
Flip Flip card animation using gesture for React Native Mar 09, 2021...
-
4
The universal React Native animation library, powered by Reanimated 2. <View from={{ opacity: 0 }} animate={{ opacity: 1 }} /> React JSX Highlights Universal...
-
7
UI Broken UI animation implemented with react native Apr 09, 2021...
-
11
skyle An experimental universal, customizable styling and animation library for React Native. 💡 Beautiful & Easy Syntax ⚡ Performant 🎨 Highly Customizable 🔼 Expo Comp...
-
7
UI Wave UI animation created with React Native Sep 19, 2021...
-
6
Header Animation header component for react native Jan 16, 2022 1 min read rn-animation-header animation header component for react n...
-
11
🔢 react-native-bignumber The fastest Big N...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK