JavaScript Library For Optimal Blocks Layout | pkmx

The Javascript for Optimal Blocks Layout allows the arrangement of elements inside the container by filling the empty areas. In the background, a dynamic height matrix is used, searches, and dedicates the appropriate fields.

grid template columns, css grid auto fit, grid template areas, grid auto flow, grid template rows, grid auto columns, css grid template columns

How to make use of it:

1. Download the Javascript file and put it at the end of the document.

<script src="pkmx.js"></script>

2. Let’s say that you have a set of items that will be arranged in the network layout.

<div id="example">
  <div class="item">Item 1</div>
  <div class="item">Item 2</div>
  <div class="item">Item 3</div>
  <div class="item">Item 4</div>
  <div class="item">Item 5</div>
  ...
</div>

3. Create the auxiliary program and identify the specifics of the container and elements.

pkmx('#sample', '#sample .item');

4. Customize network layout by passing the following options object as a third parameter to the “PKMX”.

{
  cellWidth: number,
  cellHeight: number,
  cellHorizontalAlign: left |center | right
  cellVerticalAlign: top | middle | bottom
  optimize: larger-first |
  liveAppend: boolean
  manageContainerHeight: boolean
}

compact cascading grid layout, js library for optimal blocks layout Plugin/Github


See Demo And Download

Official Website(xantorohara): Click Here

This superior jQuery/javascript plugin is developed by xantorohara. For extra advanced usage, please go to the official website.

Share