![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
react-native-gesture-flip-card
Advanced tools
[![npm version](https://badge.fury.io/js/react-native-gesture-flip-card.svg)](https://badge.fury.io/js/react-native-gesture-flip-card)
A pure javascript implementation of a flip card animation using gesture for React Native.
app
and remove the old example
renderBack
and renderFront
are passing through props instenad of passing by children.onFlipEnd
function, it will return a boolean value(1: front and 0 for back) when the flip animation ended.onFaceChanged
function, it will retrun a boolean value(1: front and 0 for back) when the face is changed.LogBox
to ignore unnecessary warnings. (To use LogBox
you need to upgrade react-native to at least 0.63 ) npm install --save react-native-gesture-flip-card
# or
yarn add react-native-gesture-flip-card
import GestureFlipView from 'react-native-gesture-flip-card';
<View style={styles.container}>
<GestureFlipView
width={300}
height={500}
renderBack={renderBack}
renderFront={renderFront}
onFaceChanged={(face) => {
// trigger when card face changed
console.log('face changed:', face);
}}
onFlipEnd={(face) => {
// trigger when flip animation ended
console.log('on flip end:', face);
}}
/>
</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>
);
};
Props | type | description | required | default |
---|---|---|---|---|
width | number | width of view | true | |
height | number | height of view | true | |
onFlipEnd | function | callback on end of flip | false | |
perspective | number | perspective of the view | false | -1000 |
gestureEnabled | bool | enable or disable gestures | false | true |
onFaceChanged | function | callback on face changed | false |
name | description | args |
---|---|---|
flipLeft | flip the card counterclockwise | |
flipRight | flip the card clockwise |
<GestureFlipView
ref={(ref) => (viewRef.current = ref)}
{...} // skip showing other props
/>
// usage
viewRef.current.flipLeft(); // counterclockwise
viewRef.current.flipRight(); // clockwise
FAQs
[![npm version](https://badge.fury.io/js/react-native-gesture-flip-card.svg)](https://badge.fury.io/js/react-native-gesture-flip-card)
The npm package react-native-gesture-flip-card receives a total of 108 weekly downloads. As such, react-native-gesture-flip-card popularity was classified as not popular.
We found that react-native-gesture-flip-card demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.