1.11.0 • Published 5 years ago

react-easy-image-gallery v1.11.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

react-easy-image-gallery

A beautiful <Gallery /> inspired by layouts of flickr and Google Photos

downloads

screenshot

Features:

  • responsive without scaling down pictures like other libraries
  • works with images of varying aspect ratios
  • 8kb unminified
  • works on Chrome, Firefox, Edge, and IE10

Live Demo and Example

https://coldshower.github.io/react-easy-image-gallery

Installation

npm install react-easy-image-gallery

Using it

import { Gallery } from 'react-easy-image-gallery';

// ...
<Gallery 
  images={[
    { 
      src: 'SOME_URL',
      width: 540,
      height: 1000
    },
    {
      src: 'SOME_OTHER_URL',
      width: 200,
      height: 121
    },
    ...etc
  ]}
/>
// ...

Check the demo for a more real life example!

Props

NameTypeDefaultDescription
imagesrequiredarrayis an array of objects with the keys src, width, and height
columnWidthnumber250default usually will suffice but if you want each picture to take up more room in a row, then increase this until satisfied
imageLoadingColorstring#f3f3f3background color of image placeholder while the image is loading

Contributing

  1. Clone the repository
  2. nvm use and npm install
  3. npm start and open localhost:8080
  4. Submit a pull request

Notes

Stock photos are from Pixabay's Developer API and can be found here https://pixabay.com/en/photos/yosemite/.

1.11.0

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago