react-native-bounceable

A touchable bounce animation that can wrap any React Native view.

Usage no npm install needed!

<script type="module">
  import reactNativeBounceable from 'https://cdn.skypack.dev/react-native-bounceable';
</script>

README

Installation

To install:

npm install --save react-native-bounceable

Props

  • level: number The maximum scale of the bounce animation (default: 1.1)
  • onPress: function An optional function to be called after a press

Example

import Bounceable from "react-native-bouceable";

render() {
  return <Bounceable
            onPress={()=>console.log("Pressed!")}
            level={1.1}>
            <View
              style={{
                width: 100,
                padding:8
              }}>
              <Text>Click Me!</Text>
            </View>
  </Bounceable>
}