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

ActiveComponent

sangroya/select2
================

Select2 is a jQuery based replacement for select boxes.

0478JavaScript

Since Dec 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/sangroya/select2)[ Packagist](https://packagist.org/packages/sangroya/select2)[ RSS](/packages/sangroya-select2/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Select2
=======

[](#select2)

[![Build Status](https://github.com/select2/select2/workflows/CI/badge.svg)](https://github.com/select2/select2/workflows/CI/badge.svg)[![Financial Contributors on Open Collective](https://camo.githubusercontent.com/e2d0e8a46d262642fa3069641cda910bd32a3cf8373a20ca3997e18bb95bbcb6/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f616c6c2f62616467652e7376673f6c6162656c3d66696e616e6369616c2b636f6e7472696275746f7273)](https://opencollective.com/select2)[![jsdelivr](https://camo.githubusercontent.com/dadeea7e860611a00beda54e223fd9c672972a5c974706e18c5f347088622064/68747470733a2f2f646174612e6a7364656c6976722e636f6d2f76312f7061636b6167652f6e706d2f73656c656374322f6261646765)](https://www.jsdelivr.com/package/npm/select2)[![cdnjs](https://camo.githubusercontent.com/aed6a74088b6a949e02ff688e79896091bb0b2991c7ed36352a5d12efc75d35f/68747470733a2f2f696d672e736869656c64732e696f2f63646e6a732f762f73656c656374322e737667)](http://www.cdnjs.com/libraries/select2)

Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets, and pagination of results.

To get started, checkout examples and documentation at

Use cases
---------

[](#use-cases)

- Enhancing native selects with search.
- Enhancing native selects with a better multi-select interface.
- Loading data from JavaScript: easily load items via AJAX and have them searchable.
- Nesting optgroups: native selects only support one level of nesting. Select2 does not have this restriction.
- Tagging: ability to add new items on the fly.
- Working with large, remote datasets: ability to partially load a dataset based on the search term.
- Paging of large datasets: easy support for loading more pages when the results are scrolled to the end.
- Templating: support for custom rendering of results and selections.

Browser compatibility
---------------------

[](#browser-compatibility)

- IE 8+
- Chrome 8+
- Firefox 10+
- Safari 3+
- Opera 10.6+

Usage
-----

[](#usage)

You can source Select2 directly from a CDN like [jsDelivr](https://www.jsdelivr.com/package/npm/select2) or [cdnjs](http://www.cdnjs.com/libraries/select2), [download it from this GitHub repo](https://github.com/select2/select2/releases), or use one of the integrations below.

Integrations
------------

[](#integrations)

Third party developers have created plugins for platforms which allow Select2 to be integrated more natively and quickly. For many platforms, additional plugins are not required because Select2 acts as a standard `` box.

Plugins

- [Backdrop CMS](https://backdropcms.org/) - [backdrop-select2](https://backdropcms.org/project/select2)
- [Django](https://www.djangoproject.com/)
    - [django-autocomplete-light](https://github.com/yourlabs/django-autocomplete-light)
    - [django-easy-select2](https://github.com/asyncee/django-easy-select2)
    - [django-select2](https://github.com/applegrew/django-select2)
- [Drupal](https://www.drupal.org/) - [drupal-select2](https://www.drupal.org/project/select2)
- [Meteor](https://www.meteor.com/) - [meteor-select2](https://github.com/nate-strauser/meteor-select2)
- [Ruby on Rails](http://rubyonrails.org/) - [select2-rails](https://github.com/argerim/select2-rails)
- [Wicket](https://wicket.apache.org/) - [wicketstuff-select2](https://github.com/wicketstuff/core/tree/master/select2-parent)
- [Yii 2](http://www.yiiframework.com/) - [yii2-widget-select2](https://github.com/kartik-v/yii2-widget-select2)
- [Angularjs](https://angularjs.org/) - [mdr-angular-select2](https://github.com/modulr/mdr-angular-select2)

Themes

- [Bootstrap 3](https://getbootstrap.com/) - [select2-bootstrap-theme](https://github.com/select2/select2-bootstrap-theme)
- [Bootstrap 4](https://getbootstrap.com/) - [select2-bootstrap4-theme](https://github.com/ttskch/select2-bootstrap4-theme)
- [Bootstrap 5](https://getbootstrap.com/docs/5.0) - [select2-bootstrap-5-theme](https://github.com/apalfrey/select2-bootstrap-5-theme)
- [Flat UI](http://designmodo.github.io/Flat-UI/) - [select2-flat-theme](https://github.com/techhysahil/select2-Flat_Theme)

Missing an integration? Modify this `README` and make a pull request back here to Select2 on GitHub.

Internationalization (i18n)
---------------------------

[](#internationalization-i18n)

Select2 supports multiple languages by simply including the right language JS file (`dist/js/i18n/it.js`, `dist/js/i18n/nl.js`, etc.) after `dist/js/select2.js`.

Missing a language? Just copy `src/js/select2/i18n/en.js`, translate it, and make a pull request back to Select2 here on GitHub.

Documentation
-------------

[](#documentation)

The documentation for Select2 is available [online at the documentation website](https://select2.org) and is located within the [`docs` directory of this repository](https://github.com/select2/select2/tree/develop/docs).

Community
---------

[](#community)

You can find out about the different ways to get in touch with the Select2 community at the [Select2 community page](https://select2.org/getting-help).

Copyright and license
---------------------

[](#copyright-and-license)

The license is available within the repository in the [LICENSE](LICENSE.md) file.

Contributors
------------

[](#contributors)

### Code Contributors

[](#code-contributors)

This project exists thanks to all the people who contribute. \[[Contribute](.github/CONTRIBUTING.md)\]. [![](https://camo.githubusercontent.com/32d30fd96eebdb3f1cb0403b3ba7f7585d0afab6b200289329a828a2d62667c1/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f636f6e7472696275746f72732e7376673f77696474683d38393026627574746f6e3d66616c7365)](https://github.com/select2/select2/graphs/contributors)

### Financial Contributors

[](#financial-contributors)

Become a financial contributor and help us sustain our community. \[[Contribute](https://opencollective.com/select2/contribute)\]

#### Individuals

[](#individuals)

[![](https://camo.githubusercontent.com/6533661c7f8e8092d94c3ab6527897514fb97fabdb23500042d224cc641d6f6d/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f696e646976696475616c732e7376673f77696474683d383930)](https://opencollective.com/select2)

#### Organizations

[](#organizations)

Support this project with your organization. Your logo will show up here with a link to your website. \[[Contribute](https://opencollective.com/select2/contribute)\]

[![](https://camo.githubusercontent.com/2f7f9a5b5ef4bcc81f5d5fab543b83eff505878986505d66dad5c75e363b72ea/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f6f7267616e697a6174696f6e2f302f6176617461722e737667)](https://opencollective.com/select2/organization/0/website)[![](https://camo.githubusercontent.com/a2909f33318e3555488c788a466516dcb83adcf11da629655933f4c1fe67d738/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f6f7267616e697a6174696f6e2f312f6176617461722e737667)](https://opencollective.com/select2/organization/1/website)[![](https://camo.githubusercontent.com/636c20fe88cb50b99ead8dd33c549d21e90a888f660e9ebbc7898d67b1b8eb32/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f6f7267616e697a6174696f6e2f322f6176617461722e737667)](https://opencollective.com/select2/organization/2/website)[![](https://camo.githubusercontent.com/764185873683ae2eb4324b4189c01c9c2444a2bd1058d4ea9314e3e981931db3/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f6f7267616e697a6174696f6e2f332f6176617461722e737667)](https://opencollective.com/select2/organization/3/website)[![](https://camo.githubusercontent.com/7c892aa311d092ff26e994473efe8ec30af6a2a287f78fe32e5fb005a02ec7a8/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f6f7267616e697a6174696f6e2f342f6176617461722e737667)](https://opencollective.com/select2/organization/4/website)[![](https://camo.githubusercontent.com/a0e1011053f4edd370f535c6302ba935d61a504a23c722da3e914ba4574a84df/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f6f7267616e697a6174696f6e2f352f6176617461722e737667)](https://opencollective.com/select2/organization/5/website)[![](https://camo.githubusercontent.com/ecc5a1ca13ff22ed041e1205b7533b6ba22f68f505b8a64f2c71d761c510b7bc/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f6f7267616e697a6174696f6e2f362f6176617461722e737667)](https://opencollective.com/select2/organization/6/website)[![](https://camo.githubusercontent.com/2d398cfe1e55ca6a4fb4dbecdaf6d64093730b7f8fa72539781d565dbbea3cdd/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f6f7267616e697a6174696f6e2f372f6176617461722e737667)](https://opencollective.com/select2/organization/7/website)[![](https://camo.githubusercontent.com/6e3f0d7daebedd3ba3fab755dd74ae2507843758a9dac4256471ceafbbb54934/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f6f7267616e697a6174696f6e2f382f6176617461722e737667)](https://opencollective.com/select2/organization/8/website)[![](https://camo.githubusercontent.com/a0313a2a7aec092cb4bf78e3609d279a1be6a4bd3fde927f387f7e095b547a29/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f73656c656374322f6f7267616e697a6174696f6e2f392f6176617461722e737667)](https://opencollective.com/select2/organization/9/website)

###  Health Score

18

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9700282?v=4)[Parveen Sangroya](/maintainers/sangroya)[@sangroya](https://github.com/sangroya)

---

Top Contributors

[![sangroya](https://avatars.githubusercontent.com/u/9700282?v=4)](https://github.com/sangroya "sangroya (2 commits)")

### Embed Badge

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

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

PHPackages © 2026

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