Masonry layout for Angular

Component allows to create an responsive image grid.

This project has been archived
View on GitHub


1. Install the npm package.

npm i ngx-masonry-layout

2. Import module:

import {MasonryLayoutComponent} from 'ngx-masonry-layout/components';

    declarations: [MasonryLayoutComponent]


myImages = [
		path: 'path_to_image',
		width: natural_width,
		height: natural_height


max-height: number
Maximum row height.
gutter: number
Adds space between item elements (it is recommended to use even numbers).
class-name: string | { [key: string]: any; }
Adds classes for each item. Supports the same syntax as ngClass.