JSFiddle - React, Tailwind, and code Playground
by oduska
HTML
<div class="form-group">
<div class="checkbox">
<input id="blah" type="checkbox" />
<label for="blah" class="control-label col-md-3">
Certificate of Assured Recycling
</label>
<input name="name" id="name" value="9" type="hidden" />
</div>
</div>
CSS
body { font-family: arial; font-size: 14px; }
/**************************************************************/
input[type="checkbox"] { display: none; }
input[type=checkbox] + label {
color: #666;
cursor: pointer;
-webkit-user-select: none;
}
input[type=checkbox] ~ label:before {
content: "";
display: inline-block;
border: 2px solid #ccc;
width: 14px; height: 14px;
vertical-align: middle;
border-radius: 3px;
text-align: center;
transition: all 0.1s ease-in-out;
}
input[type=checkbox] ~ label:hover:before {
border-color: green;
}
input[type=checkbox]:checked ~ label:before {
content: "✔";
color: green;
border-color: green;
line-height: 15px;
transition: all 0.1s ease-in-out;
}