PHPackages                             xj/yii2-weui-widget - 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. xj/yii2-weui-widget

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xj/yii2-weui-widget
===================

yii2-weui-widget

1.0.1(9y ago)1211131BSD-3-ClausePHP

Since Jan 21Pushed 8y ago5 watchersCompare

[ Source](https://github.com/xjflyttp/yii2-weui-widget)[ Packagist](https://packagist.org/packages/xj/yii2-weui-widget)[ RSS](/packages/xj-yii2-weui-widget/feed)WikiDiscussions master Synced 2mo ago

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

yii2-weui-widget
================

[](#yii2-weui-widget)

```
https://github.com/weui/weui

```

composer.json
-------------

[](#composerjson)

```
"require": {
    "xj/yii2-weui-widget": "~1.0.0"
},
```

Assets
------

[](#assets)

```
xj\weui\WeuiAsset::register($this);
```

ActionSheet
-----------

[](#actionsheet)

```
//Render Html
$actionSheet = \xj\weui\ActionSheet::begin([
    'id' => 'actionSheetParentId',
    'menus' => [
        ['id' => 'menu1', 'label' => 'menu1', 'options' => ['class' => 'myClass']],
        ['id' => 'menu2', 'label' => 'menu1', 'options' => ['class' => 'myClass']],
        ['id' => 'menu3', 'label' => 'menu1', 'options' => ['class' => 'myClass']],
    ],
    'actions' => [
        ['id' => 'actionsheet_cancel', 'label' => 'actionCancel', 'options' => ['class' => 'myClass']],
        ['id' => 'ok', 'label' => 'actionOk', 'options' => ['class' => 'myClass']],
    ]
]);
\xj\weui\ActionSheet::end();

//Script
$maskId = $actionSheet->maskId;
$actionsheetId = $actionSheet->actionsheetId;
$this->registerJs( 'Action',
    'options' => [
        'class' => [
            Button::BTN,
            Button::BTN_PRIMARY,
            Button::BTN_DISABLED
        ],
    ],
])
```

Dialog
------

[](#dialog)

```
\xj\weui\Dialog::widget([
    'type' => \xj\weui\Dialog::TYPE_CONFIRM,
    'id' => 'myDialog',
    'title' => 'MyTitle',
    'content' => 'MyContent',
    'buttons' => [
        [
            'tagName' => 'a',
            'label' => 'ok',
            'options' => [
                'href' => 'javascript:;',
                'class' => [
                    Button::BTN_DIALOG,
                    Button::BTN_DIALOG_DEFAULT,
                ],
            ]
        ],
        [
            'tagName' => 'a',
            'label' => 'cancel',
            'options' => [
                'href' => 'javascript:;',
                'class' => [
                    Button::BTN_DIALOG,
                    Button::BTN_DIALOG_PRIMARY,
                ],
            ]
        ]
    ]
])
```

Grid
----

[](#grid)

```
\xj\weui\Grid::widget([
    'items' => [
        ['label' => 'a', 'icon' => \yii\helpers\Html::img('http://weui.github.io/weui/images/icon_nav_cell.png')],
        ['label' => 'b', 'icon' => \yii\helpers\Html::img('http://weui.github.io/weui/images/icon_nav_toast.png')],
        ['label' => 'c', 'icon' => \yii\helpers\Html::img('http://weui.github.io/weui/images/icon_nav_button.png')],
        ['label' => 'd', 'icon' => \yii\helpers\Html::img('http://weui.github.io/weui/images/icon_nav_icons.png')],
    ]
]);
```

Msg Page
--------

[](#msg-page)

```
\xj\weui\MsgPage::widget([
    'iconClass' => 'weui_icon_success',
    'title' => 'myTitle',
    'desc' => 'myDesc',
    'extra' => \yii\helpers\Html::a('More', ['index']),
    'buttons' => [
        [
            'tagName' => 'a',
            'label' => 'ok',
            'options' => [
                'href' => 'javascript:;',
                'class' => [
                    Button::BTN,
                    Button::BTN_PRIMARY,
                ],
            ]
        ],
        [
            'tagName' => 'a',
            'label' => 'cancel',
            'options' => [
                'href' => 'javascript:;',
                'class' => [
                    Button::BTN,
                    Button::BTN_DEFAULT,
                ],
            ]
        ],
    ]
]);
```

Toast
-----

[](#toast)

```
\xj\weui\Toast::widget([
    'type' => \xj\weui\Toast::TYPE_LOADING,
    'id' => 'myToast',
    'label' => 'loading',
]);

\xj\weui\Toast::widget([
    'type' => \xj\weui\Toast::TYPE_COMPLETED,
    'id' => 'myToast',
    'label' => 'complete',
]);
```

Icon
----

[](#icon)

```

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community13

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

Every ~197 days

Total

2

Last Release

3567d ago

### Community

Maintainers

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

---

Top Contributors

[![xjflyttp](https://avatars.githubusercontent.com/u/128428?v=4)](https://github.com/xjflyttp "xjflyttp (12 commits)")

### Embed Badge

![Health badge](/badges/xj-yii2-weui-widget/health.svg)

```
[![Health](https://phpackages.com/badges/xj-yii2-weui-widget/health.svg)](https://phpackages.com/packages/xj-yii2-weui-widget)
```

###  Alternatives

[friends-of-hyva/purchase-order-number

Hyvä Themes Checkout Module - addon Purchase Order Number

1015.1k](/packages/friends-of-hyva-purchase-order-number)

PHPackages © 2026

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