0.1.4 • Published 4 years ago

react-animate-images v0.1.4

Weekly downloads
1
License
(ISC OR GPL-3.0)
Repository
github
Last release
4 years ago

Info

This is the project for the making animation with showing series of images in time interval. You can Move from mouse also. You can place anywhere in the react project and customise with your style of Fram. Many option are given in this.

Dependencies

No

Demo App

  import React from "react"
  import ReactAnimateImages from "../src/lib"
  class Demo extends React.Component {
    constructor() {
      super()
      this.state = {}
      this.state.images = []
      for (var i = 1; i <= 72; i++) {
        this.state.images.push("https://imgd.aeplcdn.com/1280x720/cw/360/marutisuzuki/1082/closed-door/" + i + ".jpg")
      }
    }

    render() {
      return (
        <div style={{display: "flex", justifyContent: "center"}}>
          <div>
            <h1>Demo For React Animate Images</h1>
            <div>
              <button onClick={() => this.IMGAE_ANIMATION.handleStart()}> Start </button>
              <button onClick={() => this.IMGAE_ANIMATION.handleStop()}> Stop </button>
            </div>
            <div>
              <ReactAnimateImages
                style={{ heigth: "150px" }}
                ref={instance => { this.IMGAE_ANIMATION = instance }}
                images={this.state.images} 
                framInterval={50} 
                stopAfterFirstRound={true}/>
            </div>
          </div>
        </div>
      )
    }
  }
  export default Demo

Options

OptionsTypedefault ValueDescription
imagesArray of Imagesrequiredlist of images
framIntervalpositive integer100interval between showing another images
activeImageIndexpositive integer1Start Index of image on the given array of images (start from 1)
stopAfterFirstRoundbooleanfalseStop On page load when first round completed
stopAfterEachRoundbooleanfalseStop on each round completed
classNameString""react className property
stylestring{}react style property

Give Contribution

Feel free to test and open issue on this project and will make sure your issue will be solved as soon as possible

License

(ISC OR GPL-3.0)

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago