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
https://exp.host/@sonnylazuardi/react-native-bouncing-preloader
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.
npm install --save react-native-bouncing-preloader
import BouncingPreloader from 'react-native-bouncing-preloader';
<BouncingPreloader
icons={[
'https://www.shareicon.net/data/256x256/2016/05/04/759946_bar_512x512.png',
require('./assets/image.png'),
]}
leftRotation="-680deg",
rightRotation="360deg",
leftDistance={-180},
rightDistance={-250},
speed={1200} />
// or just give icons
<BouncingPreloader
icons={[
require('./assets/image1.png'),
require('./assets/image2.png'),
]}/>
Most of the credit goes to Dany Rizky for the design inspiration.
Author: sonnylazuardi
Live Demo: https://expo.io/@sonnylazuardi/react-native-bouncing-preloader
GitHub: https://github.com/sonnylazuardi/react-native-bouncing-preloader
#react-native #programming