Skip to content

AlexHHsiao/react-gallery-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-gallery-component

A light image gallery component for React app

Setup

  • 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} />;
  }
}

Props

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'
]

Maintainers

Alex Xiao
Alex Xiao

alex.hongquan.xiao@elliemae.com

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages