creategrid
🖼 A react component for easily creating css-grids
Installation
yarn add creategrid
Or with NPM
npm install creategrid
Example
import CreateGrid from "creategrid";
<CreateGrid
gap="1rem"
style={{ maxWidth: "1200px", margin: "0 auto" }}
minItemHeight="200px"
minItemWidth="300px"
items={[
{
background: "#006aff",
col: "1 / 3"
},
{
background: "#ff0099",
row: "1 / 4",
col: "3 / 4"
},
{
background: "#eeeeee"
},
{
background: "#eeeeee"
},
{
background: "#eeeeee"
},
{
background: "#eeeeee"
}
]}
/>
Result
Contribute
Check out the repo here, fork it and create a PR