JSFiddle - React, Tailwind, and code Playground

by backstabe

HTML

<div class="checkbox">
	<input id="check1" type="checkbox" name="check" value="check1">
	<label for="check1">Checkbox No. 1</label>
	<br>
	<input id="check2" type="checkbox" name="check" value="check2">
	<label for="check2">Checkbox No. 2</label>
</div>

CSS

label {
	display: inline-block;
	cursor: pointer;
	position: relative;
	padding-left: 25px;
	margin-right: 15px;
	font-size: 13px;
}
 
input[type=checkbox] {
	display: none;
}

label:before {
	content: "";
	display: inline-block;

	width: 16px;
	height: 16px;
    border-radius: 10px;

	margin-right: 10px;
	position: absolute;
	left: 0;
	bottom: 1px;
	background-color: #aaa;
  border:2px solid black;
}
input[type=checkbox]:checked + label:before {
    content: "\2022";
    color: #f3f3f3;
    background-color: #f3f3f3;
   width: 16px;
	height: 16px;
 
}