Masonry-like Custom Element for sortable tiles that packs efficiently without changing HTML structure (changes CSS and ShadowDOM only), and adapts it to
<table>
that mimic CSS Grid Layout. So you will get (bin-packed) gap-less layout, with responsive, and adaptive features, handled natively by browser. Extended renderer forjuicy-tile-list
. Flag-less fallback forjuicy-tile-grid
.
juicy-tile-list
features, plus
<table>
that mimics CSS Grid Layout,- awesome mix of fresh Web Components with lovely table layout from 90s ❤️,
- adapting to dynamic changes of the element, parent container, and tile's content, without need to repack.
As CSS Grid Layout is not yet widely supported across major browsers, without a need to set custom flags, and we would like to use all the features of <juicy-tile-grid>
on production, we have fallback to widely supported, good old <table>
.
This custom element is layer on top of <juicy-tile-list>
that renders packed items using specifically created <table>
, so it leverages native way to handle tiles' overflow and container re-sizes, and should work in any browser.
Install the component using Bower:
$ bower install juicy-tile-table --save
Or download as ZIP.
-
Import Web Components' polyfill, if needed:
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
-
Import Custom Element:
<link rel="import" href="bower_components/juicy-tile-table/juicy-tile-table.html">
-
Start using it!
<juicy-tile-table></juicy-tile-table>
This is custom element and it uses ShadowDOM, so if your environment does not support it, you may use webcomponents/webcomponentsjs polyfill.
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