PHPackages                             globalmikebracas/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. globalmikebracas/yii2-materialize

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

globalmikebracas/yii2-materialize
=================================

Materialize CSS implementation for Yii2

3.0.0(7y ago)01BSD-3-ClausePHPPHP &gt;=5.6.0

Since Mar 8Pushed 7y ago1 watchersCompare

[ Source](https://github.com/globalmikebracas/yii2-materialize)[ Packagist](https://packagist.org/packages/globalmikebracas/yii2-materialize)[ Docs](http://macgyer.github.io/yii2-materializecss)[ RSS](/packages/globalmikebracas-yii2-materialize/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (26)Used By (0)

[![license](https://camo.githubusercontent.com/e636768cae2e2f48fb62a8ee4fc6839fc285a19eddc53547458c64e016e53e47/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c4943454e43452d4253442d2d332d2d436c617573652d626c75652e737667)](https://packagist.org/packages/macgyer/yii2-materializecss)[![Github Release](https://camo.githubusercontent.com/f9c943d8bffb4932f6adff25c67dc704a6e9f6d597dede985957b13948453d65/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d6163677965722f796969322d6d6174657269616c697a656373732e737667)](https://packagist.org/packages/macgyer/yii2-materializecss)[![Packagist](https://camo.githubusercontent.com/62bce6118b00a4d3c2c75978a02f59541d62f78c2a90941719e066e1a61b50c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6163677965722f796969322d6d6174657269616c697a656373732e737667)](https://packagist.org/packages/macgyer/yii2-materializecss)

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

[](#materialize-for-yii2)

---

This is the current, actively developed 3.x branch which is implementing Materialize version 1.0 and thus breaking backwards compatibility.

[Go to 1.x version](https://github.com/MacGyer/yii2-materializecss/tree/1.x)

[Go to 2.x version](https://github.com/MacGyer/yii2-materializecss/tree/2.x)

---

This package integrates the Materialize CSS framework into [Yii2](http://www.yiiframework.com/). [Materialize](http://materializecss.com/) is a modern responsive front-end framework based on Material Design.

See [official documentation](http://macgyer.github.io/yii2-materializecss/) for detailed information.

Have a look at the [official demo page](https://yii2-materializecss.pluspunkt-coding.de) to see the repo in action (needs adaption to v3)

Current Materialize version implemented: 1.0.0.

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

[](#installation)

The preferred way of installation is through Composer. If you don't have Composer you can get it here:

You also should install the Composer Asset Plugin to handle NPM and Bower assets:

```
$ composer global require "fxp/composer-asset-plugin:~1.4"

```

Or you can make use of Asset Packagist:

To install the package add the following to the `require` section of your composer.json:

```
"require": {
    "globalmikebracas/yii2-materializecss": "~3.0.0"
},

```

Usage
-----

[](#usage)

To load the Materialize CSS files integrate the MaterializeAsset into your app. Two ways to achieve this is to register the asset in the main layout:

```
// @app/views/layouts/main.php

\macgyer\yii2materializecss\assets\MaterializeAsset::register($this);
// further code
```

or as a dependency in your app wide AppAsset.php

```
// @app/assets/AppAsset.php

public $depends = [
    'macgyer\yii2materializecss\assets\MaterializeAsset',
    // more dependencies
];
```

Widgets
-------

[](#widgets)

The following widgets are currently available:

- ActiveField
- ActiveForm
- Alert
- Breadcrumbs
- Button
- Carousel
- ChipInput
- Collapsible
- DatePicker
- DetailView
- Dropdown
- FloatingActionButton
- GridView with ActionColumn
- Icon
- LinkPager
- MaterialBox
- Modal
- Nav
- NavBar
- Parallax
- Progress
- RangeInput
- Select
- SideNav
- Slider
- Spinner
- StaticChip
- SubmitButton
- SwitchButton
- TimePicker

Gii support
-----------

[](#gii-support)

If you are creating your CRUD controller and view files using Gii you can get materialized view files by integrating the adapted Gii templates.

```
// @app/config/main-local.php

$config['modules']['gii'] = [
    'class' => 'yii\gii\Module',
    'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'],
    'generators' => [
        'crud' => [
            'class' => 'yii\gii\generators\crud\Generator',
            'templates' => [ // setting materializecss templates
                'materializecss' => '@vendor/macgyer/yii2-materializecss/src/gii-templates/generators/crud/materializecss',
            ]
        ]
    ],
];
```

You can copy those templates to any location you wish for further customization. Make sure you adapt the path accordingly in your config.

Known issues
------------

[](#known-issues)

Systems operating on normal parameters :)

Sample layout
-------------

[](#sample-layout)

There is a sample layout file included in the package. You can use this file to get inspiration for your own layout or replace the respective `views/layouts/main.php` with the file provided.

You can find the sample layout file in `src/layout/main.php`.

Change log
----------

[](#change-log)

### 3.0.0 - 2018-11-16

[](#300---2018-11-16)

- implement Materialize v1.0.0
- **Breaking changes included**

### 2.0.0 - 2017-07-30

[](#200---2017-07-30)

- **Please note: this release contains breaking changes**
- moved [Breadcrumbs](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/navigation/Breadcrumbs.php), [Dropdown](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/navigation/Dropdown.php), [FixedActionButton](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/navigation/FixedActionButton.php), [Nav](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/navigation/Nav.php), [NavBar](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/navigation/NavBar.php) and [SideNav](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/navigation/SideNav.php) to dedicated namespace (**breaking**)
- dropped chingyawhao/materialize-clockpicker in favor of Materialize native time picker implementation (**breaking**)
- added [Collapsible](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Collapsible.php)
- updated Materialize to v0.100.1

### 1.5.0 - 2017-07-03

[](#150---2017-07-03)

- added [Carousel](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/media/Carousel.php)
- added [MaterialBox](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/media/MaterialBox.php)
- added [Parallax](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/media/Parallax.php)
- added [Slider](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/media/Slider.php)
- improved sample layout

### 1.4.0 - 2017-06-05

[](#140---2017-06-05)

- added [RangeInput](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/RangeInput.php)
- updated Materialize to v0.98.2
- added some missing PHPDoc annotations

### 1.3.0 - 2017-03-02

[](#130---2017-03-02)

- added [LinkPager](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/grid/LinkPager.php)
- [GridView](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/grid/GridView.php): set [LinkPager](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/grid/LinkPager.php) as default pager class

### 1.2.1 - 2017-02-05

[](#121---2017-02-05)

- [Select](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/Select.php): added multiple property
- Composer dependency for Yii restricted to ~2.0.0
- Composer dependency for PHP set to &gt;= 5.6.0

### 1.2.0 - 2017-02-01

[](#120---2017-02-01)

- updated Materialize to v0.98.0
- added [Select](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/Select.php)
- [ActiveField](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/ActiveField.php): added dropDownList()
- [ActiveField](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/ActiveField.php): changed characterCounter() to work with Materialize v0.98.0
- [Modal](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Modal.php): fixed modal plugin call
- [FixedActionButton](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/FixedActionButton.php): added toolbar support

### 1.1.0 - 2017-01-05

[](#110---2017-01-05)

- added [SideNav](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Button.php)
- [Nav](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Nav.php): added [SideNav](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Button.php) support
- [NavBar](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/NavBar.php): moved mobile toggle button to [Nav](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Nav.php)
- [ActiveField](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/ActiveField.php): added Materialize autocomplete support
- [ActiveField](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/ActiveField.php): added Materialize character count support
- [ActiveField](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/ActiveField.php): checkbox and radio are not enclosed by label as default

### 1.0.9 - 2016-09-01

[](#109---2016-09-01)

- added [TimePicker](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/TimePicker.php)

### 1.0.8 - 2016-08-08

[](#108---2016-08-08)

- [Button](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Button.php): fixed tag rendering
- [SwitchButton](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/SwitchButton.php): fixed uncheck property
- [Alert](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Alert.php): added `default` context class
- [Button](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Button.php): added property `type`
- [Button](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Button.php): added property `large`
- [Button](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Button.php): added property `disabled`
- [Spinner](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Spinner.php): added property `size`
- [Spinner](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Spinner.php): added property `color`
- [SwitchButton](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/SwitchButton.php): added support for Icon/HTML labels
- added [SubmitButton](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/form/SubmitButton.php)

### 1.0.7 - 2016-07-27

[](#107---2016-07-27)

- full source documentation
- fixed Materialize version to 0.97.6 to monitor 0.97.7 release before integration

### 1.0.6 - 2016-05-16

[](#106---2016-05-16)

- added sample layout
- fixed line separators
- removed Datepicker issue from section "Known issues"

### 1.0.5 - 2016-04-24

[](#105---2016-04-24)

- updated README with fixed Datepicker issue
- refactored [Breadcrumbs](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Breadcrumbs.php)

### 1.0.3 - 2016-03-10

[](#103---2016-03-10)

- fixed multiple usage of [MaterializeWidgetTrait](https://github.com/MacGyer/yii2-materializecss/blob/master/src/lib/MaterializeWidgetTrait.php) producing bugs
- updated PHPDoc in [NavBar](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/NavBar.php)

### 1.0.2 - 2016-03-09

[](#102---2016-03-09)

- added [Spinner](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Spinner.php)
- added [Progress](https://github.com/MacGyer/yii2-materializecss/blob/master/src/widgets/Progress.php)

### 1.0.1 - 2016-03-09

[](#101---2016-03-09)

- updated README
- added Packagist support

### 1.0.0 - 2016-03-09

[](#100---2016-03-09)

- Initial release

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

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

Every ~44 days

Recently: every ~59 days

Total

23

Last Release

2736d ago

Major Versions

1.x-dev → 2.0.02017-07-30

2.x-dev → 3.0.0-RC2018-06-02

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

1.2.1PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/de36874caa9dd47bdcc11a43db44977cb148856f87a4afbc2e8678f8256cc56e?d=identicon)[globalmikebracas](/maintainers/globalmikebracas)

---

Top Contributors

[![MacGyer](https://avatars.githubusercontent.com/u/2939625?v=4)](https://github.com/MacGyer "MacGyer (57 commits)")[![globalmikebracas](https://avatars.githubusercontent.com/u/10944824?v=4)](https://github.com/globalmikebracas "globalmikebracas (3 commits)")[![Gaiidenn](https://avatars.githubusercontent.com/u/18189706?v=4)](https://github.com/Gaiidenn "Gaiidenn (1 commits)")

---

Tags

yii2widgetsmaterializematerial-design

### Embed Badge

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

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

###  Alternatives

[macgyer/yii2-materializecss

Materialize CSS implementation for Yii2

8957.3k](/packages/macgyer-yii2-materializecss)[asinfotrack/yii2-toolbox

Yii2-Toolbox is a collection of useful helpers, widgets etc. extending the basic functionality of Yii2

1230.5k5](/packages/asinfotrack-yii2-toolbox)

PHPackages © 2026

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