PHPackages                             consultnn/yii2-select2 - 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. consultnn/yii2-select2

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

consultnn/yii2-select2
======================

Yii2 widget wrapper for jquery select2 plugin v4.\*

v1.0.1(10y ago)1254MITPHPPHP &gt;=5.4.0

Since Aug 7Pushed 10y ago11 watchersCompare

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

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

Yii2 select2 widget.
====================

[](#yii2-select2-widget)

Select2 widget is a wrapper of [Select2](https://select2.github.io/) for Yii 2 framework.

Install
-------

[](#install)

```
php composer.phar require --prefer-dist consultnn/yii2-select2 "*"

```

or add to `composer.json`

```
"consultnn/yii2-select2": "*"

```

Usage
-----

[](#usage)

```
echo $form->field($model, 'attribute')->widget(
    \consultnn\select2\Select2::className(),
    [
        'options' => [
            'multiple' => true
        ],
        'items' => $items, // @see Html::dropDownList() $items argument
        'pluginOptions' => [
            'ajax' => [
                'url' => Url::toRoute(['controller/autoComplete']), // return Json::encode(['results' => [['id' => 1, 'text' => 'text1'], ...]]);
                'dataType' => 'json'
            ]
        ]
    ]
);

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~17 days

Total

2

Last Release

3920d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6559f1e755ff5770d012bdedb22e589553caabaf3a78eadfa944d832ce16eef2?d=identicon)[sokrat](/maintainers/sokrat)

---

Top Contributors

[![sokrat](https://avatars.githubusercontent.com/u/427543?v=4)](https://github.com/sokrat "sokrat (5 commits)")[![serieznyi](https://avatars.githubusercontent.com/u/2323142?v=4)](https://github.com/serieznyi "serieznyi (1 commits)")

---

Tags

yii2yii2-widgets

### Embed Badge

![Health badge](/badges/consultnn-yii2-select2/health.svg)

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

PHPackages © 2026

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