1.0.3 • Published 2 years ago

@freakycoder/react-native-bounceable v1.0.3

Weekly downloads
450
License
MIT
Repository
github
Last release
2 years ago

Battle Tested ✅

Animate and bounce any component with RNBounceable for React Native

npm version npm Platform - Android and iOS License: MIT styled with prettier

Version 1 🚀

Finally we're published the version 1 for the bounceable library

  • Much better animation with pressIn and pressOut bounces 😍
  • More than 90k downloads and battle tested 💪

Installation

Add the dependency:

npm i @freakycoder/react-native-bounceable

Usage

Import

import RNBounceable from "@freakycoder/react-native-bounceable";

Fundamental Usage

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>

Configuration - Props

PropertyTypeDefaultDescription
onPressfunctionundefinedset your own logic for the onPress functionality
stylestyleundefinedset the style like any other View container
bounceEffectnumber0.9change the bounce effect's value
bounceFrictionnumber3change the bounce effect's friction value
useNativeDriverbooleantruechange the useNativeDriver's usage
animatefunctiondefaultactivate the bounce effect animation

Future Plans

  • LICENSE
  • More customizable animation props
  • Write an article about the lib on Medium

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Bounceable is available under the MIT license. See the LICENSE file for more info.