button group toggle bootstrap 4 code example
Example 1: bootstrap buttons Toggle states
Add data-toggle="button" to toggle a button’s active state. If you’re
pre-toggling a button, you must manually add the .active class and
aria-pressed="true" to the <button>.
<button type="button" class="btn btn-primary" data-toggle="button" aria-pressed="false">
Single toggle
</button>
Example 2: Bootstrap 4 Button Groups
<div class="btn-group">
<button type="button" class="btn btn-primary">Apple</button>
<button type="button" class="btn btn-primary">Samsung</button>
<button type="button" class="btn btn-primary">Sony</button>
</div>