@freakycoder/react-native-bounceable

    0.2.5 • Public • Published

    React Native Bounceable

    Battle Tested ✅

    Animate and bounce any component with RNBounceable for React Native

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

    React Native Bounceable

    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

    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

    Future Plans

    • [x] LICENSE
    • [x] 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.

    Install

    npm i @freakycoder/react-native-bounceable

    DownloadsWeekly Downloads

    462

    Version

    0.2.5

    License

    MIT

    Unpacked Size

    25.7 kB

    Total Files

    12

    Last publish

    Collaborators

    • freakycoder