PHPackages                             nerburish/yii2-masonry-view - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. nerburish/yii2-masonry-view

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

nerburish/yii2-masonry-view
===========================

ListView widget improved to use Masonry (http://masonry.desandro.com/)

1.0.0(9y ago)51.6k2[1 issues](https://github.com/nerburish/yii2-masonry-view/issues)[1 PRs](https://github.com/nerburish/yii2-masonry-view/pulls)MITPHP

Since Feb 18Pushed 8y ago3 watchersCompare

[ Source](https://github.com/nerburish/yii2-masonry-view)[ Packagist](https://packagist.org/packages/nerburish/yii2-masonry-view)[ RSS](/packages/nerburish-yii2-masonry-view/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Yii2 Masonry ListView Widget
============================

[](#yii2-masonry-listview-widget)

Yii2 widget to extend the Yii2 ListView for use it as Masonry grid layout ()

Widget demo screenshot: [![masonry-view-demo](https://cloud.githubusercontent.com/assets/5610788/17868085/7fc5279a-68ad-11e6-92ff-963f4781d4a8.png)](https://cloud.githubusercontent.com/assets/5610788/17868085/7fc5279a-68ad-11e6-92ff-963f4781d4a8.png)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist nerburish/yii2-masonry-view "*"

```

or add

```
"nerburish/yii2-masonry-view": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

The usage is similar to default ListView Widget ()

You just need a dataProvider and prepare the item template for your model.

In clientOptions you can pass the Masonry options to modify the plugin behavior (see )

You can also attach a cssFile for styling the grid.

Exemple
-------

[](#exemple)

We have this model:

```
class MyModel extends \yii\base\Model
{
	public $id;

	public $title;

	public $description;
}

```

And this item template named \_item.php:

```

```

Finally, in our view, we run the widget:

```

```

Below, the css used for the demo:

```
/* ---- grid ---- */
.grid {
  box-sizing: border-box;
}

/* clearfix */
.grid:after {
  content: '';
  display: block;
  clear: both;
}

/* ---- grid-item ---- */
.grid-item {
  width: 20%;
  padding: 10px;
  margin: 10px auto;
  float: left;
  background: #e4e4e4;
  border-radius: 5px;
}

```

You may be interested in Isotope Widget because implements Masonry and other layouts and funcionalities at once.

There is also a MatchHeight.js implementation of ListView widget:

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3419d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/15d8609efafa1febdf2ebc686337c3f7c75596c97b98bce385e9290ce7bce5b0?d=identicon)[nerburish](/maintainers/nerburish)

---

Top Contributors

[![nerburish](https://avatars.githubusercontent.com/u/5610788?v=4)](https://github.com/nerburish "nerburish (19 commits)")

---

Tags

viewyii2extensionwidgetmasonryListViewdataprovider

### Embed Badge

![Health badge](/badges/nerburish-yii2-masonry-view/health.svg)

```
[![Health](https://phpackages.com/badges/nerburish-yii2-masonry-view/health.svg)](https://phpackages.com/packages/nerburish-yii2-masonry-view)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[marekpetras/yii2-calendarview-widget

CalendarView widget for Yii 2 Framework.

2229.6k](/packages/marekpetras-yii2-calendarview-widget)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
