yii2 metroui bootstrap widgets

This extension is build for new yii2-dev version, based upon

http://metroui.org.ua/ (pls. check copyrights!)

hosted on github: https://github.com/philippfrenzel/yiimetroui


  • yii2 (current dev version)


yii metroui extension

This extension will be build upon yii2, it's hardly in development status. If you wanna take a look and enhace it, you are pretty welcome!

As I'm not an educated programmer, some of the code could be rubbish, but I try to learn from other developers which are in my opinion well skilled! :)

If you have questions, feel free to contact me!

philipp at frenzel dot net


Add the sources to your composer.json > repositories file:

    "type": "package",
    "package": {
        "name": "philippfrenzel/yiimetroui",
        "version": "0.1.10",
        "authors": [
                "name": "Philipp Frenzel",
                "homepage": "http://frenzel.net"
        "source": {
            "url": "https://github.com/philippfrenzel/yiimetroui.git",
            "type": "git",
            "reference": "master"
        "autoload": {
            "psr-0": { "yiimetroui\\": "/" }

Package is although registered at packagist.org - so you can just add one line of code, to let it run!

"require": {
        "yiisoft/yii2": "dev-master",

IMPORTANT: pls add class="metrouicss" to your body tag!!!

MetroUI already loaded? - As I use assetparser extension to parse the less files into my distribution, i commented the assets.php to avoid static css loading. If you need the css-files to be loaded statically, pls. uncomment the entries!

Add the following line to your index.php in /www

Yii::setAlias('@yiimetroui', __DIR__ . '/../vendor/philippfrenzel/yiimetroui/yiimetroui/');

Accordion (Collapse)

Put the code below into your view file and enjoy it!

use yiimetroui\Accordion;
echo Accordion::widget(array(
    'Accordion Group Label'=>array(
            // required, the content (HTML) of the group
            'content'=>'Anim pariatur cliche...',
            // optional the HTML attributes of the content group
           'contentOptions'=> array(),
           // optional the HTML attributes of the group
           'options'=> array(),


Put the code below into your view file and enjoy it!

use yiimetroui\Carousel;
echo Carousel::widget(array(


Put the code below into your view file and enjoy it!

attention, to make it more simple, always the first tab will be showed on "startup"

use yiimetroui\Tabs;
echo Tabs::widget(array(
     'items' => array(
             'header' => 'One',
             'content' => 'Mauris mauris ante, blandit et, ultrices a, suscipit eget...',
             'header' => 'Two',
             'headerOptions' => array(...),
             'content' => 'Sed non urna. Phasellus eu ligula. Vestibulum sit amet purus...',
             'options' => array(...),


Put the code below into your view file and enjoy it!

use yiimetroui\Tile;
echo Tile::widget(array(
            'content'=>'<i class="icon-github"></i>',
            'brand'=>'<div class="name">Frenzel.NET</div>',                    
    'options'=>array('class'=>'icon bg-color-green'),


Total 3 comments

#13371 report it
samilo at 2013/05/25 08:31am
Thanks :)

yes readable Thank you :)

#13370 report it
PinkBrainPlan at 2013/05/25 08:28am
Re: check your code

Already started to do so, before getting your comment ;) Hope it's readable now...

#13369 report it
samilo at 2013/05/25 08:24am
Check your code

Hi Please rewrite your code in correct way to be readable , use code (<>) in textbox toll Thanks in advance

Leave a comment

Please to leave your comment.

Create extension
No downloadable files yet