JSFiddle - React, Tailwind, and code Playground
by aldomatic
HTML
<p>Check Me: <input type="checkbox" name="boxy" value="" /></p>
CSS
body{background-color:#f2f2f2;}
p{
font-family:arial;
font-size:12px;
padding:15px;
}
input[type=checkbox] {
font-size: 16px;
-webkit-appearance: none;
position: relative;
border: 1px solid #5b5b5b;
display: inline-block;
line-height: 1em;
margin: 0;
padding: 0 0 0 5px;
width: 1em;
height: 1em;
vertical-align: text-top;
background: -webkit-linear-gradient(top, rgba(255,255,255,0.8), rgba(255,255,255,0.1)
);
}
input[type=checkbox]:checked::after {
position: absolute;
content: '';
left: 15%;
top: -10%;
height: 40%;
width: 100%;
border-bottom: 2px solid red;
border-left: 2px solid red;
-webkit-transform: rotate(-45deg);
}