Finally we're published the version 1
for the bounceable library
- Much better animation with
pressIn
andpressOut
bounces π - More than 90k downloads and battle tested πͺ
Add the dependency:
npm i @freakycoder/react-native-bounceable
import RNBounceable from "@freakycoder/react-native-bounceable";
You can put ANY children component inside the RNBounceable component, it will make it bounce when it is pressed
<RNBounceable onPress={() => {}}>
<View style={styles.bounceButtonStyle}>
<Text style={styles.bounceButtonTextStyle}>Bounce</Text>
</View>
</RNBounceable>
Property | Type | Default | Description |
---|---|---|---|
onPress | function | undefined | set your own logic for the onPress functionality |
style | style | undefined | set the style like any other View container |
bounceEffect | number | 0.9 | change the bounce effect's value |
bounceFriction | number | 3 | change the bounce effect's friction value |
useNativeDriver | boolean | true | change the useNativeDriver's usage |
animate | function | default | activate the bounce effect animation |
-
LICENSE -
More customizable animation props - Write an article about the lib on Medium
FreakyCoder, kurayogun@gmail.com
React Native Bounceable is available under the MIT license. See the LICENSE file for more info.