A bouncing touchable animated view
This project uses node and npm.
$ npm install react-native-bouncy-touchable
$ # OR
$ yarn add react-native-bouncy-touchable
export default class Button extends Component {
render () {
return (
<BouncyView
delay={60} // Animation delay in miliseconds
scale={1.1} // Max scale of animation
style={styles.button}
onPress={this.props.onPress}
>
<Text style={styles.buttonText}>
{this.props.children}
</Text>
</BouncyView>
)
}
}
Property | Type | Description | Default Value |
---|---|---|---|
onPress |
function |
Function called when user taps the view area | noop |
scale |
number |
Max scale of animation | 1.1 |
delay |
float |
Animation delay in miliseconds | 40 |
moveSlop |
number |
Slop area for press | 15 |
style |
object |
Custom style for the component | {} |
Heavily based on react-native-bounceable
- Fork it and create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am "Add some feature"
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
MIT