PHPackages                             wiisoft/yii2-materialize - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. wiisoft/yii2-materialize

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

wiisoft/yii2-materialize
========================

This is a set of widgets based on an improved version of MAZA CSS framework - MaterializeCSS framework for Yii2

1.0.5(10y ago)102625[1 PRs](https://github.com/wiisoft/yii2-materialize/pulls)MITPHP

Since Jul 22Pushed 9y ago5 watchersCompare

[ Source](https://github.com/wiisoft/yii2-materialize)[ Packagist](https://packagist.org/packages/wiisoft/yii2-materialize)[ RSS](/packages/wiisoft-yii2-materialize/feed)WikiDiscussions master Synced 1mo ago

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

Materialize for Yii2
====================

[](#materialize-for-yii2)

This is a set of widgets based on an improved version of MAZA [CSS framework](https://github.com/wiisoft/maza) - Materialize[CSS framework](http://materializecss.com/) for Yii2.

This modified fork .

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist wiisoft/yii2-materialize "*"

```

or add

```
"wiisoft/yii2-materialize": "*"

```

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

Usage
-----

[](#usage)

Navbar Widget
-------------

[](#navbar-widget)

NavBar renders a navbar HTML component.

Any content enclosed between the \[\[begin()\]\] and \[\[end()\]\] calls of NavBar is treated as the content of the navbar. You may use widgets such as \[\[Nav\]\] or \[\[\\yii\\widgets\\Menu\]\] to build up such content. For example,

```
use wii\materialize\Nav;
use wii\materialize\NavBar;

NavBar::begin(['brandLabel' => 'NavBar Test']);
echo Nav::widget([
    'items' => [
        ['label' => 'Home', 'url' => ['/site/index']],
        ['label' => 'About', 'url' => ['/site/about']],
    ],
]);
NavBar::end();
```

Navbar Widget with dropdown elemets
-----------------------------------

[](#navbar-widget-with-dropdown-elemets)

```
echo Nav::widget([
    'items' => [
        [
            'label' => 'Home',
            'url' => ['site/index'],
            'linkOptions' => [...],
        ],
        [
            'label' => 'Dropdown',
            'items' => [
                 ['label' => 'Level 1 - Dropdown A', 'url' => '#'],
                 '',
                 'Dropdown Header',
                 ['label' => 'Level 1 - Dropdown B', 'url' => '#'],
            ],
        ],
    ],
    'options' => ['class' =>'nav-pills'], // set this to nav-tab to get tab-styled navigation
]);
```

You can follow any responses to customize the display mobile menu with the parameter $mobileItems using the same parameters as for $items. If this parameter is $ mobileytems not specified, the menu specified in the $ items.

```
echo Nav::widget([
    'items' => [
        [
            'label' => 'Home',
            'url' => ['site/index'],
            'linkOptions' => [...],
        ],
        [
            'label' => 'Dropdown',
            'items' => [
                 ['label' => 'Level 1 - Dropdown A', 'url' => '#'],
                 '',
                 'Dropdown Header',
                 ['label' => 'Level 1 - Dropdown B', 'url' => '#'],
            ],
        ],
    ],
    'mobileItems'=>[
        [
            'label' => 'Home',
            'url' => ['site/index'],
            'linkOptions' => [],
        ],
        [
            'label' => 'Articles',
            'url' => ['service/articles']
        ],
        [
            'label' => 'Contacts',
            'url' => ['service/contacts']
        ]
     ],
    'options' => ['class' =>'nav-pills'], // set this to nav-tab to get tab-styled navigation
]);
```

Badge renders a materialize button.
-----------------------------------

[](#badge-renders-a-materialize-button)

```
echo Badge::widget([
    'label' => 'Action',
    'options' => ['class' => 'new'],
]);
```

Button renders a materialize button.
------------------------------------

[](#button-renders-a-materialize-button)

```
echo Button::widget([
    'label' => 'Action',
    'options' => ['class' => 'btn-large'],
]);
```

Slider renders a slides HTML component.
---------------------------------------

[](#slider-renders-a-slides-html-component)

```
echo Slider::widget([
        'items' =>[
            [
                'img' => "/tmp/1b.jpg",
                'imgOptions' => ['alt' => 'Test', 'Title' => 'Title', 'class' => 'myClass'],
                'title' => "Left Aligned Caption",
                'titleOptions' =>['id' => 'id', 'class' => 'titleClass'],
                'smallTitle' => "Here's our small slogan.",
                'smallTitleOptions' => ['class' => 'light grey-text text-lighten-3'],
                'itemOptions' => ['class' => 'center-align'],

            ],
            [
                'img' => "/tmp/2b.jpg",
                'title' => "Left Aligned Caption",
                'smallTitle' => "Here's our small slogan.",
                'smallTitleOptions' => ['class' => 'light grey-text text-lighten-3'],
                'itemOptions' => ['class' => 'left-align']
            ],
            [
                'img' => "/tmp/3b.jpg",
                'title' => "Left Aligned Caption",
                'smallTitle' => "Here's our small slogan.",
                'smallTitleOptions' => ['class' => 'light grey-text text-lighten-3'],
                'itemOptions' => ['class' => 'right-align']
            ],
        ],
        'options'=>['id'=>'options'],
        'slidesOptions'=>['class'=>'slidesOptions'],
```

Card renders a card HTML component.
-----------------------------------

[](#card-renders-a-card-html-component)

```
echo Card::widget([
  'item' => [
             'img' => '/tmp/3.jpg',
             'imgOptions' => ['class' => 'imgOptions', 'id' => 'imgOptions'],
             'cardImgOptions' => ['class' => 'cardImgOptions', 'id' => 'cardImgOptions'],
             'cardContentOptions' => ['class' => 'cardContentOptions', 'id' => 'cardContentOptions'],
             'cardTitle'=>'Card Title',
             'cardTitleOptions'=>['class'=>'cardTitleOptions','id'=>'cardTitleOptions'],
             'cardContent' => [
                  [
                  'tag' => 'p',
                  'body' => 'I am a very simple card. I am good at containing small bits of information.
                  I am convenient because I require little markup to use effectively.'
                  ]

             ],
             'cardReveal' => [
                 [
                     'tag' => 'span',
                     'activator' => 'true',
                     'options' => [],
                     'body' => ' Card Title '
                 ],
                 [
                     'tag' => 'p',
                     'options' => [],
                     'body' => 'This is a link'
                 ],
             ],
             'cardAction' => [
                  [
                  'tag' => 'span',
                  'body' => 'This is a link'
                  ],
                 [
                 'tag' => 'span',
                 'body' => 'This is a link'
                 ],
             ],
         ],
     'options' => ['class' => 'wow bounceIn']
 ]);
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 91.9% 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

3953d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13550c17f3ed1eda1fea96c2b5f6c37e7216f9840889de141030b7ac4af5dbd5?d=identicon)[wiisoft](/maintainers/wiisoft)

---

Top Contributors

[![wiisoft](https://avatars.githubusercontent.com/u/11736558?v=4)](https://github.com/wiisoft "wiisoft (57 commits)")[![InsaneSkull](https://avatars.githubusercontent.com/u/14233668?v=4)](https://github.com/InsaneSkull "InsaneSkull (4 commits)")[![Metrakit](https://avatars.githubusercontent.com/u/3305600?v=4)](https://github.com/Metrakit "Metrakit (1 commits)")

---

Tags

yii2materializematerial-designyii2-extensionsyii2-design

### Embed Badge

![Health badge](/badges/wiisoft-yii2-materialize/health.svg)

```
[![Health](https://phpackages.com/badges/wiisoft-yii2-materialize/health.svg)](https://phpackages.com/packages/wiisoft-yii2-materialize)
```

###  Alternatives

[wenzhixin/bootstrap-table

An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)

11.8k283.4k1](/packages/wenzhixin-bootstrap-table)[macgyer/yii2-materializecss

Materialize CSS implementation for Yii2

8957.3k](/packages/macgyer-yii2-materializecss)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)

PHPackages © 2026

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