Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/berkanakyurek/select2-bootstrap4-theme
A theme for Select2 v4 and Bootstrap 4
https://github.com/berkanakyurek/select2-bootstrap4-theme
bootstrap4 css scss select2
Last synced: about 3 hours ago
JSON representation
A theme for Select2 v4 and Bootstrap 4
- Host: GitHub
- URL: https://github.com/berkanakyurek/select2-bootstrap4-theme
- Owner: berkanakyurek
- License: mit
- Created: 2017-12-12T16:46:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-19T01:32:19.000Z (about 3 years ago)
- Last Synced: 2024-09-19T11:13:50.230Z (8 days ago)
- Topics: bootstrap4, css, scss, select2
- Language: CSS
- Homepage: https://berkan52.github.io/select2-bootstrap4-theme/
- Size: 41 KB
- Stars: 91
- Watchers: 9
- Forks: 42
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Select2 Bootstrap4 Theme
![select2-bootstrap4-theme version](https://img.shields.io/badge/select2--bootstrap4--theme-v.1.0.0-brightgreen.svg)
[![License](http://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)#### Compatibility
Tested with Bootstrap v4.1.1 and Select2 v4.0.6rc1 in latest Firefox, Chrome and Safari (Mac).
#### Installation
* [Download the latest release](https://github.com/berkan52/select2-bootstrap4-theme/releases).
* Clone the repo: `git clone https://github.com/berkan52/select2-bootstrap4-theme.git`.
* Install with [Bower](http://bower.io): `bower install select2-bootstrap4-theme`.
* Install with [npm](https://www.npmjs.com): `npm install select2-bootstrap4-theme`.#### Usage
select2-bootstrap4-theme only works with Select2 v4.x. Applying the theme requires `select2-bootstrap4.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: "bootstrap4"
});
```You may also set it as the default theme for all Select2 widgets like so:
```js
$.fn.select2.defaults.set( "theme", "bootstrap4" );
```#### Changelog
##### Version 1.0.2
* Latest build for Bootstrap 4.1.1
##### Version 1.0.1
* Fixed some bugs when running `npm run dev`;
##### Version 1.0.0
* Create project
#### Copyright and license
The license is available within the repository in the [LICENSE](LICENSE) file.