

Flip card animation using gesture for React Native
source link: https://reactnativeexample.com/flip-card-animation-using-gesture-for-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.

Flip card animation using gesture for React Native
react-native-gesture-flip-card
flip card animation using gesture for React Native.
Installation
npm install --save react-native-gesture-flip-card
Simple Preview
Minimal Usage
import GestureFlipView from 'react-native-gesture-flip-card';
<View style={styles.container}>
<GestureFlipView width={300} height={500}>
{renderBack()}
{renderFront()}
</GestureFlipView>
</View>
const renderFront = () => {
return (
<View style={styles.frontStyle}>
<Text style={{fontSize: 25, color: '#fff'}}>{'Front'}</Text>
</View>
);
};
const renderBack = () => {
return (
<View style={styles.backStyle}>
<Text style={{fontSize: 25, color: '#fff'}}>{'Back'}</Text>
</View>
);
};
Detail
Props
Props type description required default width number width of view true
height number height of view true
onFlipEnd function callback on end of flip
perspective number perspective of the view
-1000
Method
name description args doFlip flip the card number: 1 or -1<GestureFlipView ref={(ref) => this.flipView = ref}
width={300} height={500}>
{renderBack()}
{renderFront()}
</GestureFlipView>
this.flipView.doFlip(1) // counterclockwise
this.flipView.doFlip(-1) // clockwise
GitHub
A card flipping animation component using gesture for react-native. — Read More
Recommend
-
24
Welcome to the final part of a three-part series on adding animations to React Native app. In this tutorial, we’ll be taking a look at how you can respond to the user’s gestures and animate the components involved in the...
-
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...
-
48
README.md View this repo as a live demo in CodeSandbox. This rep...
-
25
Replacing the Gesture Responder System with the Gesture Handler.
-
8
-
9
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
-
18
-
5
How to Build Simple Card Flip Animation in React Native Using ReAnimated V2A simple Card Flip animation to help you get started with animations in React Native.
-
10
Gesture React native gesture password component Jun 18, 2023 1 min read
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK