JSFiddle - React, Tailwind, and code Playground
HTML
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<br/>
<div class="[ form-group ]">
<input type="checkbox" name="fancy-checkbox-success" id="fancy-checkbox-success" autocomplete="off" />
<div class="[ btn-group ]">
<label for="fancy-checkbox-success" class="[ btn btn-success ]">
<span class="[ glyphicon glyphicon-ok ]"></span>
<span>Â </span>
</label>
<label for="fancy-checkbox-success" class="[ btn btn-default active ]">
Success Checkbox
</label>
</div>
</div>
CSS
.form-group input[type="checkbox"] {
display: none;
}
.form-group input[type="checkbox"] + .btn-group > label span {
width: 20px;
}
.form-group input[type="checkbox"] + .btn-group > label span:first-child {
display: none;
}
.form-group input[type="checkbox"] + .btn-group > label span:last-child {
display: inline-block;
}
.form-group input[type="checkbox"]:checked + .btn-group > label span:first-child {
display: inline-block;
}
.form-group input[type="checkbox"]:checked + .btn-group > label span:last-child {
display: none;
}