Skip to content
This repository was archived by the owner on May 14, 2019. It is now read-only.
/ minigrid Public archive

πŸ“ Minimal 2kb zero dependency cascading grid layout

License

Notifications You must be signed in to change notification settings

hnqso/minigrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7524d14 Β· Dec 7, 2016
Nov 25, 2016
Nov 25, 2016
Nov 25, 2016
Apr 19, 2016
Sep 9, 2015
Mar 1, 2016
Apr 19, 2016
Nov 25, 2016
Apr 19, 2016
Jul 29, 2015
Dec 5, 2016
Nov 25, 2016

Repository files navigation

Minigrid

Minigrid is a minimal 2kb zero dependency cascading grid layout.

Website & Documentation: http://alves.im/minigrid.

Demo

There's a simple example on jsbin.

Installation

Using NPM

npm install minigrid --save

Or 1998 script tag from unpkg:

<script src="https://unpkg.com/minigrid@3.1.1/dist/minigrid.min.js"></script>

Usage

It works on a grid container with a group of grid items.

<div class="cards">
  <div class="card"></div>
  <div class="card"></div>
  <div class="card"></div>
</div>

Then:

var grid = new Minigrid({
  container: '.cards',
  item: '.card',
  gutter: 6
});
grid.mount();

Limitation

Minigrid was built having in mind "cards" with same width and different heights. If your cards have different width sizes or you need more power Minigrid might not be right for you.

Contributing

Plese see CONTRIBUTING.

License

MIT Β© 2016 Henrique Alves