Masonry-like Custom Element for sortable tiles that packs efficiently without changing HTML structure (changes CSS only), and adapts it to CSS Grid Layout. So you will get (bin-packed) gap-less layout, with responsive, and adaptive features, handled natively by browser. Extended renderer for
juicy-tile-list
.
juicy-tile-list
features, plus
- CSS Grid Layout,
- adapting to dynamic changes of the element, parent container, and tile's content, without need to repack.
<juicy-tile-grid>
is layer on top of <juicy-tile-list>
that renders packed items using CSS Grid Layout, so it leverages native way to handle tiles' overflow, and gives more structured CSS which can be styled according to design needs.
Install the component using Bower:
$ bower install juicy-tile-grid --save
Or download as ZIP.
-
Import Web Components' polyfill:
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
-
Import Custom Element:
<link rel="import" href="bower_components/juicy-tile-grid/juicy-tile-grid.html">
-
Start using it!
<juicy-tile-grid></juicy-tile-grid>
This element is using CSS Grid Layout, so if your environment does not support it, you may need to enable it or use shim.
All juicy-tile-list
options, plus
Attribute | Options | Default | Description |
---|---|---|---|
setup.items[.].heightFlexible |
Boolean | false |
Let the tile's row adapt to the element/parent HTML element resize - grow/shrink proportionally, without a need to repack items. |
setup.items[.].widthFlexible |
Boolean | false |
Let the tile's column adapt to the element/parent HTML element resize - grow/shrink proportionally, without a need to repack items. |
setup.items[.].heightDynamic |
Boolean | false |
Let the tile's row adapt to the tile HTML element resize - grow/shrink accordingly, without a need to repack items. |
setup.items[.].widthDynamic |
Boolean | false |
Let the tile's column adapt to the tile HTML element resize - grow/shrink accordingly, without a need to repack items. |
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
For detailed changelog, check Releases.
MIT