PHPackages                             ommu/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. [Templating &amp; Views](/categories/templating)
4. /
5. ommu/yii2-selectize

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

ommu/yii2-selectize
===================

selectize.js wrapper for yii2

1.4.1(7y ago)0121MITPHPPHP &gt;=5.6

Since Jun 17Pushed 10mo ago1 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (8)Used By (0)

 [ ![](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 ommu/yii2-selectize "dev-master"

```

or add

```
"ommu/yii2-selectize": "dev-master"
```

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)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

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

Recently: every ~242 days

Total

6

Last Release

2618d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15258224?v=4)[OMMU](/maintainers/ommu)[@ommu](https://github.com/ommu)

---

Top Contributors

[![PutraSudaryanto](https://avatars.githubusercontent.com/u/5587049?v=4)](https://github.com/PutraSudaryanto "PutraSudaryanto (10 commits)")[![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

dropdownformselectizeselectizejstag-inputtagsyii2yii2-extensionyii2 selectizeyii2 selectize.jsyii2 selectyii2 tagging

### Embed Badge

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

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

###  Alternatives

[yii2mod/yii2-selectize

selectize.js wrapper for yii2

1731.0k1](/packages/yii2mod-yii2-selectize)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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