react-zoom-carousel
v1.17.0
Published
>
Downloads
19
Readme
react-zoom-carousel
Install
npm install --save react-zoom-carousel
Usage
import React, { Component } from 'react'
import ZoomGallery from 'react-zoom-carousel'
const zoomGallery = [
'http://placehold.it/900x',
'http://placehold.it/900x',
'http://placehold.it/900x',
'http://placehold.it/900x',
'http://placehold.it/900x'
]
class Example extends Component {
state = {
open: true,
}
render () {
return (
<ZoomGallery
open={this.state.open} // Conditionally show/hide the carousel
handleClose={() => this.setState({ open: false })} // Called when close button is clicked
images={zoomGallery} // Array of image urls
initialIndex={0} // Index to start the slider from
/>
)
}
}
License
MIT © devil1991