Bootstrap - Select


Bootstrap permits to style the default select element but does not add any feature.

The bootstrap select 1) library aims to fill the gap:

  • with a search box function
  • multiple select on one line
  • and more


<link rel="stylesheet" href="" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  • Bootstrap-Select: Style and Javascript
<link rel="stylesheet" href="[email protected]/dist/css/bootstrap-select.min.css">
<script src="[email protected]/dist/js/bootstrap-select.min.js"></script>
  • Code from the examples 2)
<select class="selectpicker" multiple>
  <optgroup label="Condiments" data-max-options="2">
  <optgroup label="Breads" data-max-options="2">
  • Result:



bootstrap-select does not yet support Bootstrap 5 unfortunately

Documentation / Reference

Discover More
How to use the Select HTML Element?

select is an HTML control form element used for selecting one or more value amongst a set of options. It creates a drop-down list used in a form that will set a scalar value from a list of options. ...

Share this page:
Follow us:
Task Runner