A light image gallery component for React app
npm install react-gallery-component
import GalleryComponent from 'react-gallery-component';
const images = [
'img_url_1',
'img_url_2',
'img_url_3',
'img_url_4'
];
class App extends React.Component {
render() {
return <GalleryComponent imageCollection={images} />;
}
}
Property | Type | Required | Default | Description |
---|---|---|---|---|
imageCollection | array | ✅ | An array of image URL for the image gallery | |
backgroundColor | string | grey |
Image container background color when image is not filling the whole container | |
imageFill | boolean | false |
Image is scaled to maintain its aspect ratio or sized to filling the entire image container | |
infinite | boolean | false |
Infinite sliding | |
slideTime | number (ms) | 500 |
Sliding time between each image |
// imageCollection example
[
'img_url_1',
'img_url_2',
'img_url_3',
'img_url_4'
]
Alex Xiao alex.hongquan.xiao@elliemae.com |