JSPM

react-native-LoopAnimation

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q39124F

react-native component that let you loop an image in the background

Package Exports

  • react-native-LoopAnimation

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-LoopAnimation) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-native-LoopAnimation

react-native component that let you loop an image in the background

Example

Installation

npm i react-native-LoopAnimation

Example

import LoopAnimation from 'react-native-LoopAnimation.js'
...
render() {
  //you can also use, like source={imgSource}
  const imgSource={uri:'http://www.menucool.com/slider/jsImgSlider/images/image-slider-2.jpg',width:700,height:306};

  return (
    <View style={{flex:1}}>
      {/*this is the background animation */}
      <LoopAnimation source={require('./img/back.jpg')} duration={10000} />
      <View style={{
        flex: 1,
        flexDirection: 'column',
        justifyContent: 'center',
        alignItems: 'center',
      }}>
        {/*Content goes here*/}
        <View style={{width: 200, height: 400, backgroundColor: 'powderblue'}} />
      </View>
    </View>
  );
}

Props

Prop Description Default
source This is the source of the image
duration time to pass the first image 10000ms
style styles you want to add to Animated.image height: Window.height