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

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

pcrt/yii2-select2
=================

Yii2-select2 widget implementation

1.0.4(6y ago)06.5k↑19.2%1BSD-3-ClausePHP

Since Feb 26Pushed 6y ago1 watchersCompare

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

READMEChangelog (5)DependenciesVersions (4)Used By (1)

Yii2-select2
============

[](#yii2-select2)

[Select2](https://select2.github.io/) gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options.

\##Installation

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

Either run

```
$ php composer.phar require pcrt/yii2-select "*"

```

or add

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

```

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

Usage
-----

[](#usage)

Once the extension is installed, modify your application configuration to include:

```
use pcrt\widgets\select2\Select2:

// with \yii\bootstrap\ActiveForm;
echo $form
    ->field($model, 'attribute')
    ->widget(
        Select2::class,
        [
            'items' => $data, // $data should be the same as the items provided to a regular yii2 dropdownlist
        ]
    );

// as widget
echo Select2::widget([
    'name' => 'my-name',
    'value' => 'my-value',
    'clientOptions' => [
        'maximumInputLength' => 20
    ]
]);
```

License
-------

[](#license)

Yii2-select2 is released under the BSD-3 License. See the bundled `LICENSE.md` for details.

Enjoy!

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~136 days

Total

3

Last Release

2413d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f6ad6343f484e9e2ee1c530ec7c4067ad974f540cff580dce786b8953f3fdd1?d=identicon)[protocolli](/maintainers/protocolli)

---

Top Contributors

[![fr00ller](https://avatars.githubusercontent.com/u/722758?v=4)](https://github.com/fr00ller "fr00ller (10 commits)")[![pcrt](https://avatars.githubusercontent.com/u/44270932?v=4)](https://github.com/pcrt "pcrt (2 commits)")

---

Tags

helperyii2themeassetsselect2

### Embed Badge

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

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

###  Alternatives

[ttskch/select2-bootstrap4-theme

Select2 v4 theme for Bootstrap4

43525.7k2](/packages/ttskch-select2-bootstrap4-theme)

PHPackages © 2026

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