PHPackages                             yii2mod/yii2-selectize - 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. yii2mod/yii2-selectize

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

yii2mod/yii2-selectize
======================

selectize.js wrapper for yii2

1.3(9y ago)1731.2k↓69.9%10[1 issues](https://github.com/yii2mod/yii2-selectize/issues)1MITPHPPHP &gt;=5.6

Since Jun 17Pushed 6y ago4 watchersCompare

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

READMEChangelog (4)Dependencies (4)Versions (5)Used By (1)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Yii2 Selectize Widget
=====================

[](#yii2-selectize-widget)

Widget based on selectize.js extension

[![Latest Stable Version](https://camo.githubusercontent.com/6300102817f98749e00a9bbf01ffec29a42a601e505c21c856cb09cee17481e4/68747470733a2f2f706f7365722e707567782e6f72672f796969326d6f642f796969322d73656c656374697a652f762f737461626c65)](https://packagist.org/packages/yii2mod/yii2-selectize) [![Total Downloads](https://camo.githubusercontent.com/5481dc48ec32ab8c5220031fed373c354938435f3cf45dcd2e2ae63ce57e936c/68747470733a2f2f706f7365722e707567782e6f72672f796969326d6f642f796969322d73656c656374697a652f646f776e6c6f616473)](https://packagist.org/packages/yii2mod/yii2-selectize) [![License](https://camo.githubusercontent.com/ca093f19cebcbd98be1cb0486ab4c655c01233487004e836a2c3f73554fc0592/68747470733a2f2f706f7365722e707567782e6f72672f796969326d6f642f796969322d73656c656374697a652f6c6963656e7365)](https://packagist.org/packages/yii2mod/yii2-selectize)[![Build Status](https://camo.githubusercontent.com/a9f0223045a7daa143059d61cc04f8bb9f5e30fe6f2012d479843d6410bcaef4/68747470733a2f2f7472617669732d63692e6f72672f796969326d6f642f796969322d73656c656374697a652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/yii2mod/yii2-selectize)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist yii2mod/yii2-selectize "*"

```

or add

```
"yii2mod/yii2-selectize": "*"
```

to the require section of your composer.json.

Usage
-----

[](#usage)

Once the extension is installed, simply add widget to your page as follows:

1. Tagging input:

```
echo $form->field($model, "attribute")->widget(Selectize::className(), [
        'pluginOptions' => [
            'persist' => false,
            'createOnBlur' => true,
            'create' => true
        ]
]);
```

2. Select input:

```
echo $form->field($model, "attribute")->widget(Selectize::className(), [
        'items' => [
            'Yes',
            'No'
        ],
        'pluginOptions' => [
            'persist' => false,
            'createOnBlur' => true,
            'create' => true
        ]
]);
```

3. Tagging input with remote source and default values(If you want render select input, just setup items property):

**Setup view file:**

```
// setup the following to get the existing data from database
$model->attribute = 'first, last';

// or if the data is an array you can preselect the tags like this
$model->attribute = implode(', ', ["first", "last"]);

echo $form->field($model, "attribute")->widget(Selectize::className(), [
         'url' => '/site/search',
         'pluginOptions' => [
            'valueField' => 'name',
            'labelField' => 'name',
            'searchField' => ['name'],
            'persist' => false,
            'createOnBlur' => true,
            'create' => true
        ]
]);
```

**Your action must return data in the json format, for example:**

```
  public function actionSearch($query = null)
  {
      Yii::$app->response->format = Response::FORMAT_JSON;
      return [
          ['name' => 'Search Item 1'],
          ['name' => 'Search Item 2'],
      ];
  }
```

4. Usage widget with plugins:

```
echo Selectize::widget([
        'name' => 'tag-selectize',
        'options' => [
             'data-data' => $values ? Json::encode($values) : null // Set default values
        ],
        'pluginOptions' => [
             // define list of plugins
            'plugins' => ['drag_drop', 'remove_button'],
            'persist' => false,
            'createOnBlur' => true,
            'create' => true
        ]
 ]);
```

Select Options
--------------

[](#select-options)

You can find them on the [options page](https://github.com/brianreavis/selectize.js/blob/master/docs/api.md)

Support us
----------

[](#support-us)

Does your business depend on our contributions? Reach out and support us on [Patreon](https://www.patreon.com/yii2mod). All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~208 days

Total

4

Last Release

3408d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a53a15e1548ce60ee92591e71492a39eaaecfc88eaa1a9d7f353d5c910381de?d=identicon)[disem](/maintainers/disem)

---

Top Contributors

[![dmitry-semenov](https://avatars.githubusercontent.com/u/17027799?v=4)](https://github.com/dmitry-semenov "dmitry-semenov (1 commits)")[![lichunqiang](https://avatars.githubusercontent.com/u/2433916?v=4)](https://github.com/lichunqiang "lichunqiang (1 commits)")

---

Tags

yii2yii2-extensionyii2-select-widgetyii2-selectizeyii2-tagging-inputyii2 selectizeyii2 selectize.jsyii2 selectyii2 tagging

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/yii2mod-yii2-selectize/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.8k59](/packages/skeeks-cms)[edofre/yii2-fullcalendar

Yii2 widget for fullcalendar

2763.3k1](/packages/edofre-yii2-fullcalendar)

PHPackages © 2026

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