creategrid

1.0.3 • Public • Published

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

Package Sidebar

Install

npm i creategrid

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

9.28 kB

Total Files

5

Last publish

Collaborators

  • albingroen