An open API service indexing awesome lists of open source software.

https://github.com/ibraabukaff/react-flexi-image-grid

React js Flexible Image Grid View
https://github.com/ibraabukaff/react-flexi-image-grid

flexible grid grid-view image photo-grid react reactjs

Last synced: 3 months ago
JSON representation

React js Flexible Image Grid View

Awesome Lists containing this project

README

          

# react-flexi-image-grid
React js Flexible Image Grid View

How to install ?



yarn add react-flexi-image-grid




Examples:

4 Columns:



![4 columns pics](./example-pics/ss1.png)

2 Columns:



![2 columns pics](./example-pics/ss3.png)

How to use it ?

```

import React, {Component} from "react";
import {FlexiImageGrid} from "react-flexi-image-grid";

class App extends Component {

onClickHandler = (e) => {
console.log(e.target.id);
console.log(e.target.className);
console.log(e.target.src);

};

render() {
return (


);
}
}

export default App;

```

Expected Props:

1- `images` , it's an array of objects , each object can have the following structure:
```
{

src: "https://www.w3schools.com/w3images/wedding.jpg",
className: "img1",
id: "idImg1",
height: "200px",
alt: "here 1",

}
```

2- `numberOfColumns` it can be 1, 2 ,or 4