Multiselect MDB Pro component
Bootstrap Multiselect
Note: We are transitioning MDB4 to a legacy version and focusing on developing MDB5.
While we'll continue to support for the transition period, we encourage you to migrate to
MDB5. We're offering a huge discount on MDB5 PRO to help with your transition,
enabling you to leverage the full potential of the latest version. You can find more information here.
upgrade with discount
Bootstrap Multiselect is a jQuery based plugin that allows users to tick multiple options from a standard Bootstrap select.
Its implementation is quite simple, and in exchange brings a lot of UX value.
Examples of Bootstrap Multiselect use:
- Ingredient choice within a pizza delivery system
- Laptop hardware configuration an online shop
- Flight booking customization
See the following mutliselect dropdown examples:
Default multiselect
Basic example of select component that allows you to choose from a number of options.
<select class="custom-select" multiple>
<option selected>Open this select menu</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
Material design MDB Pro component
<div class="row">
<div class="col-md-12">
<select class="mdb-select colorful-select dropdown-primary md-form" multiple searchable="Search here..">
<option value="" disabled selected>Choose your country</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="4">Poland</option>
<option value="5">Japan</option>
</select>
<label class="mdb-main-label">Label example</label>
<button class="btn-save btn btn-primary btn-sm">Save</button>
</div>
</div>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Overwriting a standard select
MDB overwrites a standard select to replace it with our Material Select. That's why before you can use it, you have to initialize Material Select by placing the following code in your project.
In addition, you will need a separate call for any dynamically generated select elements your page generates.
Initialization:
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Full documentation of our select
You can find detailed documentation and all available options in our Material Select documentation.
Standard multiselect MDB Pro component
<select class="mdb-select md-form" multiple>
<option value="" disabled selected>Choose your country</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="4">Poland</option>
<option value="5">Japan</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Multiselect with label MDB Pro component
<select class="mdb-select md-form" multiple>
<option value="" disabled selected>Choose your country</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<label class="mdb-main-label">Label example</label>
<button class="btn-save btn btn-primary btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Colorful Multiselect with label MDB Pro component
<select class="mdb-select md-form colorful-select dropdown-danger" multiple>
<option value="" disabled selected>Choose your country</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<label class="mdb-main-label">Label example</label>
<button class="btn-save btn btn-danger btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Multiselect with options groups MDB Pro component
In select you can also activate multiple mode so that you can select several items.
<select class="mdb-select md-form" multiple>
<optgroup label="team 1">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</optgroup>
<optgroup label="team 2">
<option value="3">Option 3</option>
<option value="4">Option 4</option>
</optgroup>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Multiselect with icons MDB Pro component
<select class="mdb-select md-form" multiple>
<option value="" data-icon="https://mdbootstrap.com/img/Photos/Avatars/avatar-1.webp" class="rounded-circle">
example
1</option>
<option value="" data-icon="https://mdbootstrap.com/img/Photos/Avatars/avatar-2.webp" class="rounded-circle">
example
2</option>
<option value="" data-icon="https://mdbootstrap.com/img/Photos/Avatars/avatar-3.webp" class="rounded-circle">
example
3</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Multiselect with search box MDB Pro component
<select class="mdb-select md-form" multiple searchable="Search here..">
<option value="" disabled selected>Choose your country</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Multiselect with label and search box MDB Pro component
<select class="mdb-select md-form" multiple searchable="Search here..">
<option value="" disabled selected>Choose your country</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<label class="mdb-main-label">Label example</label>
<button class="btn-save btn btn-primary btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Colorful Multiselect with label and search box MDB Pro component
<select class="mdb-select md-form colorful-select dropdown-primary" multiple searchable="Search here..">
<option value="" disabled selected>Choose your country</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<label class="mdb-main-label">Label example</label>
<button class="btn-save btn btn-primary btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Multiselect with options groups and search box MDB Pro component
To select you can also add search box.
<select class="mdb-select" multiple searchable="Search here..">
<option value="" data-icon="https://mdbootstrap.com/img/Photos/Avatars/avatar-1.webp" class="rounded-circle">
example
1</option>
<option value="" data-icon="https://mdbootstrap.com/img/Photos/Avatars/avatar-2.webp" class="rounded-circle">
example
2</option>
<option value="" data-icon="https://mdbootstrap.com/img/Photos/Avatars/avatar-3.webp" class="rounded-circle">
example
3</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Multiselect with icons and search box MDB Pro component
You can add both icons and searchbox to multiselect.
<select class="mdb-select md-form" multiple searchable="Search here..">
<option value="" data-icon="https://mdbootstrap.com/img/Photos/Avatars/avatar-1.webp" class="rounded-circle">
example
1</option>
<option value="" data-icon="https://mdbootstrap.com/img/Photos/Avatars/avatar-2.webp" class="rounded-circle">
example
2</option>
<option value="" data-icon="https://mdbootstrap.com/img/Photos/Avatars/avatar-3.webp" class="rounded-circle">
example
3</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Multiselect with FA icons and search box MDB Pro component
<select class="mdb-select md-form" multiple searchable="Search here..">
<option value="" data-fas="laptop blue-text"> example 1</option>
<option value="" data-far="circle red-text">
example
2</option>
<option value="" data-fab="facebook brown-text">
example
3</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
// Material Select Initialization
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Material Select with translations MDB Pro component
<div class="col-md-3 my-3">
<select id="lang" class="mdb-select md-form" multiple searchable="Szukaj tutaj..">
<option value="" disabled selected>Wybierz kraje</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
</div>
<div class="col-md-3 my-3">
<select id="lang1" class="mdb-select md-form" multiple searchable="Suche hier..">
<option value="" disabled selected>Wähle dein Land</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
</div>
<div class="col-md-3 my-3">
<select id="lang2" class="mdb-select md-form" multiple searchable="..ابحث هنا">
<option value="" disabled selected>اختر بلدك</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
</div>
<div class="col-md-6 my-3">
<select id="lang3" class="mdb-select md-form" multiple searchable="Cari di sini..">
<option value="" disabled selected>Pilih negaramu</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
</div>
<div class="col-md-6 my-3">
<select id="lang4" class="mdb-select md-form" multiple searchable="Cherche ici..">
<option value="" disabled selected>Choisis ton pays</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
</div>
<script>
$(document).ready(function() {
$('#lang').materialSelect({
labels: {
selectAll: 'Wybierz wszystkie',
optionsSelected: 'wybranych opcji',
noSearchResults: 'Brak wyników'
}
});
})
$(document).ready(function() {
$('#lang1').materialSelect({
labels: {
selectAll: 'Alles auswählen',
optionsSelected: 'Optionen ausgewählt',
noSearchResults: 'keine Ergebnisse'
}
});
})
$(document).ready(function() {
$('#lang2').materialSelect({
labels: {
selectAll: 'حدد الكل',
optionsSelected: 'خيارات محددة',
noSearchResults: 'لا توجد نتائج'
}
});
})
$(document).ready(function() {
$('#lang3').materialSelect({
labels: {
selectAll: 'Pilih semua',
optionsSelected: 'opsi dipilih',
noSearchResults: 'tidak ada hasil'
}
});
})
$(document).ready(function() {
$('#lang4').materialSelect({
labels: {
selectAll: 'Sélectionner tout',
optionsSelected: 'options sélectionnées',
noSearchResults: 'Aucun résultat'
}
});
})
</script>
Material Select with advanced translations MDB Pro component
<div class="col-md-6 my-3">
<select id="lang-pl" class="mdb-select md-form" multiple searchable="Szukaj..." data-label-select-all="Wybierz wszystkie" data-label-options-selected="opcji wybranych">
<option value="" disabled selected>Wybierz kraj</option>
<option value="1">Stany Zjednoczone</option>
<option value="2">Niemcy</option>
<option value="3">Francja</option>
<option value="3">Polska</option>
<option value="3">Japonia</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Zapisz</button>
</div>
$(document).ready(function() {
$('.mdb-select').materialSelect();
});
Multiselect with Bootstrap styles MDB Pro component
<div class="col-md-6 my-3">
<select id="sel-bs" class="mdb-select md-form" multiple searchable="Search for...">
<option value="" disabled selected>Select all</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="3">Poland</option>
<option value="3">Japan</option>
</select>
<button class="btn-save btn btn-primary btn-sm">Save</button>
</div>
$(document).ready(function() {
$('#sel-bs').materialSelect({
defaultMaterialInput: true
});
})
Multiselect validation MDB Pro component
<form class="needs-validation" novalidate>
<select class="mdb-select validate md-form" multiple searchable="Search here..">
<option value="" disabled selected>Choose your country</option>
<option value="1">USA</option>
<option value="2">Germany</option>
<option value="3">France</option>
<option value="4">Poland</option>
<option value="5">Japan</option>
</select>
<button class="btn btn-default btn-sm">Submit</button>
</form>
$(document).ready(function() {
$('.mdb-select.validate').materialSelect({
validate: true,
labels: {
validFeedback: 'Correct choice',
invalidFeedback: 'Wrong choice'
}
});
function validateSelect(e) {
e.preventDefault();
$('.needs-validation').addClass('was-validated');
if ($('.needs-validation select').val() == '') {
$('.needs-validation').find('.valid-feedback').hide();
$('.needs-validation').find('.invalid-feedback').show();
$('.needs-validation').find('.select-dropdown').val('').prop('placeholder', 'No countries selected')
} else {
$('.needs-validation').find('.valid-feedback').show();
$('.needs-validation').find('.invalid-feedback').hide();
}
}
$('.needs-validation select').on('change', e => validateSelect(e))
$('.needs-validation').on('submit', e => validateSelect(e))
});
Multiselect options and attributes MDB Pro component
The options are the same as in the Single Select, described here.