Giter Site home page Giter Site logo

wrathchaos / react-native-bounceable Goto Github PK

View Code? Open in Web Editor NEW
67.0 5.0 4.0 127.56 MB

๐Ÿš€ Animate and bounce any component with RNBounceable for React Native

Home Page: https://freakycoder.com

JavaScript 13.26% Starlark 1.25% Java 32.39% Ruby 2.58% Objective-C 4.96% TypeScript 17.71% Makefile 3.13% C++ 14.48% Shell 1.00% Objective-C++ 9.24%
react-native reactjs javascript bounceable bounce animation react-native-animation apple ios android

react-native-bounceable's Introduction

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

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

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

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

Author

FreakyCoder, [email protected]

License

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

react-native-bounceable's People

Contributors

wrathchaos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-bounceable's Issues

How do I disable the bouncy?

I want to disable the bounce in certain conditions, how can I do that?
I have tried setting all these props to 0

  bounceEffectIn?: number;
  bounceEffectOut?: number;
  bounceVelocityIn?: number;
  bounceVelocityOut?: number;
  bouncinessIn?: number;
  bouncinessOut?: number;

but it didn't work

Need an appropriate loader to handle this file type for RNBounceable.js

node_modules/@freakycoder/react-native-bounceable/build/dist/RNBounceable.js 30:16
Module parse failed: Unexpected token (30:16)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| render() {
| const { children, style } = this.props;

    return (<react_native_1.TouchableWithoutFeedback {...this.props} onPress={this.onPress.bind(this, react_native_1.Easing.bounce)}>

| <react_native_1.Animated.View style={[{ transform: [{ scale: this.state.springValue }] }, style]}>
| {children}

Do you know why this happening??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.