PHPackages                             prawee/yii2-widgets - 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. prawee/yii2-widgets

ActiveYii2-extension

prawee/yii2-widgets
===================

yii2 widgets alert

1.0.0(6y ago)21.5k5MITPHP

Since Jul 21Pushed 5y ago1 watchersCompare

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

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

Extends widgets classes for Yii2 and Bootstrap 4
================================================

[](#extends-widgets-classes-for-yii2-and-bootstrap-4)

The extends class for all widgets classes on views

contains
--------

[](#contains)

- ButtonAjax for make ajax button for showing modal
- LinkAjax for make ajax link for showing modal

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist prawee/yii2-widgets "dev-master"

```

or add

```
"prawee/yii2-widgets": "dev-master"

```

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

Usage
-----

[](#usage)

### ButtonAjax | LinkAjax

[](#buttonajax--linkajax)

#### on your views

[](#on-your-views)

```
use prawee\widgets\ButtonAjax;
use yii\bootstrap\Modal;

echo ButtonAjax::widget([
    'name'=>'Create',
    'route'=>['create'],
    'modalId'=>'#main-modal',
    'modalContent'=>'#main-content-modal',
    'options'=>[
        'class'=>'btn btn-success',
        'title'=>'Button for create application',
    ]
]);
...
Modal::begin(['id'=>'main-modal']);
echo '';
Modal::end();
```

#### on your controller

[](#on-your-controller)

```
public functionn actionCreate(){
    ...
    if(Yii::$app->getRequest()->isAjax){
        return $this->renderAjax('create', [
            'model' => $model,
        ]);
    }else{
        return $this->render('create', [
            'model' => $model,
        ]);
    }
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

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

2486d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3203937?v=4)[Prawee Wongsa](/maintainers/prawee)[@prawee](https://github.com/prawee)

---

Top Contributors

[![prawee](https://avatars.githubusercontent.com/u/3203937?v=4)](https://github.com/prawee "prawee (74 commits)")[![mydesign](https://avatars.githubusercontent.com/u/579933?v=4)](https://github.com/mydesign "mydesign (1 commits)")

---

Tags

ajaxbuttonbutton-widgetcreatemodalupdateyii2-widgetsyii2extensionalert

### Embed Badge

![Health badge](/badges/prawee-yii2-widgets/health.svg)

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

PHPackages © 2026

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