1.0.3 ā€¢ Published 5 years ago

creategrid v1.0.3

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

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

CSS grid result

Contribute

Check out the repo here, fork it and create a PR