0.8.43 • Published 4 years ago

react-infinite-image-link-carousel v0.8.43

Weekly downloads
14
License
MIT
Repository
github
Last release
4 years ago

react-infinite-image-link-carousel

npm version license size minsize

Install

npm install react-infinite-image-link-carousel --save 

Demo

Props

I have kept minimal configurations. Less configurations Less confusions.

Minimum 5 images are required. From which a combination of 3 will be shown at a time. If image list is less than 5, than this package will not work the way it is designed for.

Example

import React from 'react';
import ReactDOM from 'react-dom';
import ReactInfiniteImageLinkCorousal from 'react-infinite-image-link-carousel'

class App extends React.Component {
      constructor(props) {
        super(props)

        // this is the format of imagelist required for this package
        // You need to provide image location, along with
        // the link you want to go to, else you can keep '#'
            
        this.state = {
            imgList: [
                { image: 'imgs/2.jpg', href: '#' },
                { image: 'imgs/5.jpg', href: '#' },
                { image: 'imgs/6.jpg', href: '#' },
                { image: 'imgs/7.jpg', href: '#' },
                { image: 'imgs/8.jpg', href: '#' },
                { image: 'imgs/9.jpg', href: '#' },
                { image: 'imgs/10.jpg', href: '#' }
            ]
        }
    }

    render() {
        return (
            <div>
                <ReactInfiniteImageLinkCorousal 
                    imageList={this.state.imgList}  // Imagelist in the above format is required, rest i'll take care
                    autoInfiniteSlider={false}         // True if you want auto-slide function else false
                    infiniteSlideTimeScaleInMs={5000}     // Mention totals seconda after which slide should happen
                    heightOfImage={'50vh'} />        // Height of images or corousel
            </div>
        )
    }

}

ReactDOM.render(
  <App />,
  document.getElementById('app')
);

MIT Licensed

:smiley:

0.8.43

4 years ago

0.8.42

4 years ago

0.8.41

4 years ago

0.8.40

4 years ago

0.8.39

4 years ago

0.8.38

4 years ago

0.8.37

4 years ago

0.8.36

4 years ago

0.8.35

4 years ago

0.8.34

4 years ago

0.8.33

4 years ago

0.8.32

4 years ago

0.8.31

4 years ago

0.8.3

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago