React Native Bouncing Preloader
Bouncing Preloader Component with custom icons in React Native
Based on the dribbble shot by Dany Rizky: https://dribbble.com/shots/4423936-Islands-Preloader-Animation
Demo
https://exp.host/@sonnylazuardi/react-native-bouncing-preloader
Background
When I saw the preloader animation, I think it would be great if we can use our own icon and give more control to the bouncing animation and rotation. So I tried to make this open source component.
Goals
- Animate our own custom icon
- Flexible to use remote image url or local image file
- Able to control distance, rotation angle etc
Usage
npm install --save react-native-bouncing-preloader
- In your react native script add these lines
import BouncingPreloader from 'react-native-bouncing-preloader'; <BouncingPreloader = ="-680deg", ="360deg", =, =, = /> // or just give icons <BouncingPreloader =/>
Available props
icons
: PropTypes.array,leftRotation
: PropTypes.string,rightRotation
: PropTypes.string,leftDistance
: PropTypes.number,rightDistance
: PropTypes.number,speed
: PropTypes.number
Contributing
- Feel free to open PR.
Examples
Most of the credit goes to Dany Rizky for the design inspiration.
License
MIT Licensed