Open-source project
select2/select2 avatar
select2/select2

Select2: a jQuery select box replacement that finally tagged 4.1.0 after five years of release candidates

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

25,907 stars6,116 forksJavaScriptMIT

At a glance

What is it?
select2/select2 turns a native select into a searchable, taggable, remotely loaded dropdown through jQuery. Version 4.1.0 shipped on 2026-05-26, and the repository was still receiving pushes in early November 2026.
Who is it for?
Use Select2 if your pages already load jQuery and you need searchable, taggable or AJAX-backed dropdowns on top of native select elements, especially inside Django, Drupal, Rails or Yii where a plugin exists. Do not pick it for a React or framework-native component tree, since the README lists no React integration.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • select2/select225,907 ★ · +1
Star history
Repository2026-10-082026-11-25
select2/select225.9k25.9k

1 Stars in the last 48 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Select2 enhances a native select element and keeps it as the source of truth

Select2 describes itself as a jQuery-based replacement for select boxes. The README's integration section adds the detail that matters for adoption: for many platforms no additional plugin is required because Select2 acts as a standard select box. You write a normal select element in your markup, and Select2 layers search, a nicer multi-select interface and remote loading on top of it.

That design has a direct consequence for form handling. Because the underlying element is still a select, server-side form posts keep their usual shape, and frameworks that render selects can keep rendering them. The README lists the use cases that justify the layer: enhancing native selects with search, enhancing multi-select, loading data from JavaScript via AJAX and making it searchable, nesting optgroups beyond the single level native selects support, tagging new items on the fly, partially loading large remote datasets based on the search term, paging, and templating of results and selections.

The repository description and the package.json description both say it supports searching, remote data sets and infinite scrolling of results, while the README body says pagination of results. Both phrases point at the same feature: results load in pages as the list is scrolled to the end.

Version 4.1.0 landed on 2026-05-26 after beta.1 in 2020 and rc.0 in 2021

The release list tells a slow story. 4.1.0-beta.1 was published on 2020-05-02. 4.1.0-rc.0 followed on 2021-01-23. The final 4.1.0 appeared on 2026-05-26, more than five years after the release candidate. The package.json on the develop branch reads version 4.1.0, which matches the tag.

For anyone asking whether Select2 is dead, those dates are the facts. The repository is not archived and the last push was on 2026-11-02. A stable release came out this year. That does not say how quickly a given bug will be fixed, but it rules out the abandoned label.

The long gap does leave something for you to check. Many tutorials and blog posts were written against 4.0.x or against the beta and rc builds. If a snippet you copied relies on behaviour from an older build, test it against 4.1.0 rather than assuming it carries over. CHANGELOG.md sits at the top of the repository for exactly that comparison.

The default branch is develop, not main, which matters if you clone the repository and expect the released state: check out the 4.1.0 tag or take the files from the releases page.

The built files live in dist/, and the package entry points at select2.js and select2.css

The README gives three ways to get Select2: source it from a CDN such as jsDelivr or cdnjs, download it from the GitHub releases page, or use one of the integrations. There is no install command in the README. The package.json is the only place that shows the npm shape.

The package name is select2, the main field is dist/js/select2.js and the style field is dist/css/select2.css. The files field publishes two directories, src and dist, so the unminified source ships alongside the build. Three other manifests sit at the top level of the repository, bower.json, component.json and composer.json, and package.json also carries a jspm block that maps lib to dist. These cover package managers from several eras, and which ones still receive updates is not stated in the README.

For a plain HTML page the practical recipe follows from those paths: load jQuery first, then dist/js/select2.js, then link dist/css/select2.css. The README does not spell out that order or the minimum jQuery version, so verify both on select2.org before shipping. A wrong order is the usual reason a dropdown silently stays a plain select, because the plugin method is not yet attached to jQuery when your initialisation code runs.

Browser support is listed back to IE 8, and the list is old

The README's compatibility section reads: IE 8+, Chrome 8+, Firefox 10+, Safari 3+ and Opera 10.6+. Those numbers describe browsers that almost nobody runs, and the list has not been narrowed in the README even though 4.1.0 came out in 2026.

Treat the list with caution in both directions. It does not tell you the current build is tested in Internet Explorer 8, and nothing else in the repository says it is. It also gives no upper bound or mention of modern browsers, so the absence of a modern-browser statement is not a warning either. The test suite lives in tests/ and the Grunt setup includes grunt-contrib-qunit, which suggests a QUnit-driven runner, but the README does not say which browsers it runs in.

If your organization has a formal browser policy, validate Select2 against it yourself with the browsers you support. The compatibility section is a statement from the maintainers, not a test report you can cite.

One related point concerns jQuery itself. Select2 cannot run without it, so every page that uses a Select2 dropdown also pays for loading jQuery. The README says nothing about which jQuery versions work, and package.json lists no jQuery dependency at all, only jquery-mousewheel as a development dependency. A modern site that has removed jQuery would be adding it back purely for this widget.

Language files are separate scripts that must come after select2.js

Internationalization works by including a language file after the main script. The README names dist/js/i18n/it.js and dist/js/i18n/nl.js as examples, and the order is explicit: they go after dist/js/select2.js. A language script loaded before the core file has nothing to attach to, so strings stay in English.

Contributing a missing language is a short job by the README's description. Copy src/js/select2/i18n/en.js, translate the strings and open a pull request. That makes en.js the reference for which messages exist, such as the text shown when no results match.

The cost of this approach is one extra script request per language on the page. The README gives no bundled all-languages file, so if your site switches language at runtime you need to load the right file per locale yourself. This repository's README does not cover configuration options for choosing the language.

The theming story is similar. Bootstrap 3, Bootstrap 4, Bootstrap 5 and Flat UI themes are listed, but each lives in a separate third-party repository.

Framework plugins are third-party, and React is not on the list

The integration list is long and entirely maintained outside this repository. Plugins are named for Backdrop CMS, Django (django-autocomplete-light, django-easy-select2 and django-select2), Drupal, Meteor, Ruby on Rails (select2-rails), Wicket, Yii 2 and AngularJS (mdr-angular-select2). Themes cover Bootstrap 3, 4 and 5 and Flat UI. The README invites readers to edit the README and send a pull request if an integration is missing.

Three consequences follow. First, the quality and update pace of each plugin is outside the control of the Select2 maintainers, so check the plugin repository, not this one, before relying on it with a new Select2 version. Second, the Bootstrap 5 theme is a third-party project, which answers the common question about Bootstrap 5: it exists, but you install it separately. Third, searches for Select2 with React or ASP.NET have no answer here. The README has no React or ASP.NET entry, and since Select2 is a jQuery plugin, using it in a React tree means managing the DOM element yourself or using something not covered by this repository.

The AngularJS entry points to the old Angular generation, not modern Angular.

The Django cluster is the clearest example of why the choice matters. Three separate projects are listed under that single heading, and they take different approaches to the same problem, so picking one is a decision about your form layer, not about Select2 itself. Drupal and Backdrop CMS each get a module page on their own sites, and Rails goes through a gem-style repository named select2-rails. Where your platform has no entry, the README's statement that Select2 acts as a standard select box is the fallback: wire it up by hand on the page.

The build is Grunt with Sass, and the docs need Python 3.14 or newer

Contributors work in a build chain that dates from the jQuery plugin era. The devDependencies include grunt ^1.6.2, grunt-cli, grunt-contrib-concat, grunt-contrib-connect, grunt-contrib-jshint, grunt-contrib-qunit, grunt-contrib-requirejs, grunt-contrib-uglify and grunt-sass, with sass ^1.100.0, almond ~0.3.3 and jquery-mousewheel ~3.2.2. The almond and requirejs entries point to an AMD module build that gets bundled into dist/js/select2.js. The presence of .jshintrc and .jshintignore next to .biome.json shows two linters in the tree.

The package.json scripts section holds only documentation commands: docs:serve runs uv run mkdocs serve, and docs:build runs uv run mkdocs build --strict. There is no npm test script in package.json, so a contributor has to read Gruntfile.js to learn how the QUnit tests are launched.

The documentation project is defined in pyproject.toml as select2-docs with requires-python >= 3.14. Its dependencies are mkdocs, mkdocs-material, markdown-callouts, Pygments, mkdocs-git-committers-plugin-2, mkdocs-git-revision-date-localized-plugin and mkdocs-redirects. The docs live in the docs directory and are published at select2.org. If you want to preview documentation edits locally, you need uv and a Python 3.14 interpreter, which is newer than many machines have installed.

Editorial conclusion

Use Select2 if your pages already load jQuery and you need searchable, taggable or AJAX-backed dropdowns on top of native select elements, especially inside Django, Drupal, Rails or Yii where a plugin exists. Do not pick it for a React or framework-native component tree, since the README lists no React integration. Before adopting, read the browser compatibility list against your actual support policy and confirm the 4.1.0 files from dist/ are what your CDN link serves.

Frequently asked questions

What is Select2 in jQuery?

Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets and paging of results, and it acts as a standard select box on many platforms.

What is the current version of Select2?

The latest release in the repository is 4.1.0, published on 2026-05-26. The earlier 4.1.0-rc.0 dates from 2021-01-23 and 4.1.0-beta.1 from 2020-05-02.

Can I use Select2 with Bootstrap 5?

The README lists a Bootstrap 5 theme, select2-bootstrap-5-theme, but it is a separate third-party repository that you install alongside Select2.

Is Select2 dead?

The repository is not archived, its last push was on 2026-11-02, and version 4.1.0 was released on 2026-05-26.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. select2/select2 on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/select2-select2.svg)](https://hysenlabs.com/projects/select2-select2)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/select2-select2.svg)](https://hysenlabs.com/projects/select2-select2)

Was this useful?