This is a fork for specific maintenance issues for our usage; please contribute to the upstream project and not this one.
Select2 v4 theme for Bootstrap4 (Compatible to boostrap 4.0.0+)
๐ https://ttskch.github.io/select2-bootstrap4-theme/
<link rel="stylesheet" href="/path/to/select2.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ttskch/[email protected]/dist/select2-bootstrap4.min.css">
# npm
$ npm install @ttskch/select2-bootstrap4-theme
# yarn
$ yarn add @ttskch/select2-bootstrap4-theme
# composer
$ composer require ttskch/select2-bootstrap4-theme
<link rel="stylesheet" href="/path/to/select2.css">
<link rel="stylesheet" href="/path/to/select2-bootstrap4.min.css">
$('select').select2({
theme: 'bootstrap4',
});
- Fix src/_layout.scss, src/_single.scss or src/_multiple.scss
- Do
npm run build:both
- Send me a Pull Request
You can use docs dir for your development.
- Do
npm run prepare
(this creates symlink todist/select2-bootstrap4.css
ontodocs
) - Serve
docs
with your local web server (e.g.php -S localhost:8888 -t docs
) - Do
npm run watch
- Tweak scss and browse demo page on your browser