A [Select2](https://select2.github.io/) v4 [Theme](https://select2.github.io/examples.html#themes) for Bootstrap 3 ![select2-bootstrap-theme version](https://img.shields.io/badge/select2--bootstrap--theme-v0.1.0--beta.10-brightgreen.svg) [![License](http://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT) Demonstrations available at [select2.github.io/select2-bootstrap-theme](http://select2.github.io/select2-bootstrap-theme/) #### Compatibility Built and tested with Bootstrap v3.3.7 and Select2 v4.0.3 in latest Chrome, Firefox and Safari (Mac) and Internet Explorer 11, 10 and 9 (should work in IE8). #### Installation You can [download select2-bootstrap-theme from this GitHub repo](https://github.com/select2/select2-bootstrap-theme/releases), install it using Bower or npm – required if you want to integrate the Sass or Less sources in your build process – or source the compiled CSS directly from CDNJS or jsDelivr. ##### Install using Bower or npm/yarn You may install select2-bootstrap-theme with [Bower](https://bower.io/), [npm](https://www.npmjs.com/) or [Yarn](https://yarnpkg.com/): ```shell // Bower bower install select2-bootstrap-theme // npm npm install select2-bootstrap-theme // yarn yarn add select2-bootstrap-theme ``` ##### Source select2-bootstrap-theme from CDNJS or jsDelivr select2-bootstrap-theme [is also available on CDNJS](https://cdnjs.com/libraries/select2-bootstrap-theme/) and [jsDelivr](http://www.jsdelivr.com/projects/select2-bootstrap-theme). #### Usage select2-bootstrap-theme only works with Select2 v4.x. Applying the theme requires `select2-bootstrap.css` referenced after the default `select2.css` that comes with Select2: ```html ``` To apply the theme, tell Select2 to do so by passing `bootstrap` to the [`theme`](https://select2.github.io/examples.html#themes) option when initializing Select2: ```js $( "#dropdown" ).select2({ theme: "bootstrap" }); ``` You may also set it as the default theme for all Select2 widgets like so: ```js $.fn.select2.defaults.set( "theme", "bootstrap" ); ``` #### Changelog ##### 0.1.0-beta.10 * Compiled with grunt-sass v2.0.0 (was v1.2.1). * Merged pull request [#54](https://github.com/select2/select2-bootstrap-theme/pull/54) by @odahcam (and fixed it: `:first-child/:not(:first-child)/:last-child` for `.select2-container--bootstrap` won’t play nice in our case; we have to take the original `