iron-justified-gallery
![Stars on vaadin.com/directory](https://camo.githubusercontent.com/79e82d87a0b6378dd0aec0e71e7834a93d3086302a784fa8975f2b0a310e56d1/68747470733a2f2f696d672e736869656c64732e696f2f76616164696e2d6469726563746f72792f737461722f436f6c6c61626f726e6569726f6e2d6a75737469666965642d67616c6c6572792e737667)
Polymer element that shows a pretty formatted gallery (using the Flickr justified-layout library)
Install
npm install iron-justified-gallery
This component can be used with bower, as long as bower-npm-resolver is enabled in your project:
npm install bower-npm-resolver
Enable the resolver by adding something like this to .bowerrc
:
{
"resolvers": [
"bower-npm-resolver"
]
}
Then install the component:
bower install iron-justified-gallery
<iron-justified-gallery
images="[[images]]"
gallery-width="500"
row-height="150">
</iron-justified-gallery>
Usage
Supported options:
Option | Description |
---|---|
images | Source of images that will be rendered in the gallery |
galleryWidth | Width that the gallery will take |
rowHeight | Height of a single row in the gallery |
The images need to be a JavaScript array with absolute URLs:
const array = [
{ url: "http://www.server.com/image1.png", width: 500 },
{ url: "http://www.server.com/image2.png", width: 500 },
{ url: "http://www.server.com/image3.png", width: 500 }
];