JSFiddle - React, Tailwind, and code Playground

by Shashank D

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<script src="https://code.jquery.com/jquery-3.2.1.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>


<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>


<select class="selectpicker" data-style="btn-light" data-width="100%" multiple data-max-options="2">
<option data-content="<span class='label label-success'>Choice1 </span> <small class='text-muted'>Subtext1</small>">Choice1</option>
<option data-content="<span class='label label-info'>Choice2 </span><small class='text-muted'>Subtext2</small>">Choice2</option>
<option data-content="<span class='label label-warning'>Choice3 </span><small class='text-muted'>Subtext3</small>">Choice3</option>
</select>

CSS

.bootstrap-select .filter-option .text-muted {
  display: none;
}

JavaScript

$('select.selectpicker').selectpicker();