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

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

ivaynberg/select2
=================

Select2 is a jQuery based replacement for select boxes.

4.1.0(1mo ago)25.9k445.7k↓41.5%6.2k[122 issues](https://github.com/select2/select2/issues)[11 PRs](https://github.com/select2/select2/pulls)5MITJavaScriptCI passing

Since Mar 23Pushed 2w ago694 watchersCompare

[ Source](https://github.com/select2/select2)[ Packagist](https://packagist.org/packages/ivaynberg/select2)[ Docs](https://select2.org/)[ GitHub Sponsors](https://github.com/kevin-brown)[ Fund](https://opencollective.com/select2)[ RSS](/packages/ivaynberg-select2/feed)WikiDiscussions develop Synced yesterday

READMEChangelog (10)DependenciesVersions (41)Used By (5)

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, check out 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/codingjoe/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 maintained in the [`docs` directory of this repository](https://github.com/select2/select2/tree/develop/docs) using MkDocs.

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)\]

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

###  Health Score

76

—

ExcellentBetter than 100% of packages

Maintenance94

Actively maintained with recent releases

Popularity74

Solid adoption and visibility

Community51

Growing community involvement

Maturity75

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~577 days

Total

36

Last Release

37d ago

Major Versions

3.5.2 → 4.0.0-beta.12015-01-08

3.5.4 → 4.0.1-rc.12015-11-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/150030?v=4)[Igor Vaynberg](/maintainers/ivaynberg)[@ivaynberg](https://github.com/ivaynberg)

---

Top Contributors

[![kevin-brown](https://avatars.githubusercontent.com/u/1991850?v=4)](https://github.com/kevin-brown "kevin-brown (847 commits)")[![ivaynberg](https://avatars.githubusercontent.com/u/150030?v=4)](https://github.com/ivaynberg "ivaynberg (706 commits)")[![alexweissman](https://avatars.githubusercontent.com/u/5004534?v=4)](https://github.com/alexweissman "alexweissman (129 commits)")[![merkuriy](https://avatars.githubusercontent.com/u/575792?v=4)](https://github.com/merkuriy "merkuriy (14 commits)")[![justindujardin](https://avatars.githubusercontent.com/u/101493?v=4)](https://github.com/justindujardin "justindujardin (14 commits)")[![creage](https://avatars.githubusercontent.com/u/910967?v=4)](https://github.com/creage "creage (11 commits)")[![pedrofurtado](https://avatars.githubusercontent.com/u/10530520?v=4)](https://github.com/pedrofurtado "pedrofurtado (9 commits)")[![milupo](https://avatars.githubusercontent.com/u/1248520?v=4)](https://github.com/milupo "milupo (8 commits)")[![mkurz](https://avatars.githubusercontent.com/u/644927?v=4)](https://github.com/mkurz "mkurz (8 commits)")[![jayaddison](https://avatars.githubusercontent.com/u/55152140?v=4)](https://github.com/jayaddison "jayaddison (8 commits)")[![codingjoe](https://avatars.githubusercontent.com/u/1772890?v=4)](https://github.com/codingjoe "codingjoe (7 commits)")[![jdecuyper](https://avatars.githubusercontent.com/u/369777?v=4)](https://github.com/jdecuyper "jdecuyper (7 commits)")[![stretch4x4](https://avatars.githubusercontent.com/u/12271094?v=4)](https://github.com/stretch4x4 "stretch4x4 (7 commits)")[![kows](https://avatars.githubusercontent.com/u/7290402?v=4)](https://github.com/kows "kows (6 commits)")[![mnrafg](https://avatars.githubusercontent.com/u/22196871?v=4)](https://github.com/mnrafg "mnrafg (5 commits)")[![wyuenho](https://avatars.githubusercontent.com/u/160028?v=4)](https://github.com/wyuenho "wyuenho (4 commits)")[![boyaq](https://avatars.githubusercontent.com/u/641537?v=4)](https://github.com/boyaq "boyaq (4 commits)")[![chroder](https://avatars.githubusercontent.com/u/145357?v=4)](https://github.com/chroder "chroder (4 commits)")[![gsmet](https://avatars.githubusercontent.com/u/1279749?v=4)](https://github.com/gsmet "gsmet (4 commits)")[![mander77](https://avatars.githubusercontent.com/u/220622142?v=4)](https://github.com/mander77 "mander77 (4 commits)")

---

Tags

hacktoberfestjavascriptjqueryselect2

### Embed Badge

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

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

###  Alternatives

[mcguffin/acf-quick-edit-fields

WordPress Plugin implementing Column Displaying, QuickEdit and BulkEdit for Advanced Custom Fields (ACF)

36462.4k](/packages/mcguffin-acf-quick-edit-fields)[a6digital/laravel-default-profile-image

Laravel package to create default profile image using name of user.

42352.2k](/packages/a6digital-laravel-default-profile-image)[danielme85/laravel-geoip2

Service provider and DB downloader for Maxminds PHP API GeoIP2.

15182.0k](/packages/danielme85-laravel-geoip2)[robloach/jquery-once

Act on jQuery elements only once.

592.9k](/packages/robloach-jquery-once)

PHPackages © 2026

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