Giter VIP home page Giter VIP logo

react-animate-image's Introduction

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

Options Type default Value Description
images Array of Images required list of images
framInterval positive integer 100 interval between showing another images
activeImageIndex positive integer 1 Start Index of image on the given array of images (start from 1)
stopAfterFirstRound boolean false Stop On page load when first round completed
stopAfterEachRound boolean false Stop on each round completed
className String "" react className property
style string {} 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)

react-animate-image's People

Contributors

puli-laxman avatar

Stargazers

 avatar

Watchers

 avatar

react-animate-image's Issues

Update state

I change the props through the parent component. The picture still rotates old. Help.

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.