JSFiddle - React, Tailwind, and code Playground
by Roberto Salemi
HTML
<script src="https://code.jquery.com/jquery-3.4.1.slim.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css">
<div class="col-form-label">
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="TYPE" value="radio1" checked>
<label class="form-check-label">Radio 1</label>
</div>
<div class="form-check form-check-inline">
<input type="radio" class="form-check-input" name="TYPE" value="radio2">
<label class="form-check-label">Radio 2</label>
</div>
</div>
CSS
.form-group {
margin-bottom: 1rem;
}
.custom-control {
position: relative;
display: block;
min-height: 1.5rem;
padding-left: 2.5rem;
}
input[type=checkbox], input[type=radio] {
box-sizing: border-box;
padding: 0;
}
.custom-control-input {
position: absolute;
z-index: -1;
opacity: 0;
}
label:not(.form-check-label):not(.custom-file-label) {
font-weight: 700;
}
.custom-control-label {
position: relative;
margin-bottom: 0;
vertical-align: top;
}
label {
display: inline-block;
}