A grid to recreate the unsplash like gallery in react. This project is a rewrite of unsplash-gallery project to port it in a configureable component.
Install from npm:
npm install react-unsplash-grid-gallery
import UnsplashGallery from 'react-unsplash-grid-gallery';
// rest of code omitted for the sake of this example
// ...
const images = [
{height: 500, width: 300, src: 'http://example.com/img1.jpg'},
{height: 200, width: 400, src: 'http://example.com/img2.jpg'},
{height: 350, width: 600, src: 'http://example.com/img3.jpg'},
]
<UnsplashGalllery images={images} columns={3} />
// ...
Type: Array<{width, height, src}>
Required: true
Type: number
Required: false
Default: 2
The number of columns to render images into.
MIT © Made with <3 & ☕ by Hamza Baig