JSFiddle - React, Tailwind, and code Playground

HTML

<input type="radio" name="test" id="test0">
<span>
    <label for="test0"></label>
</span>
<input type="radio" name="test" id="test1">
<span>
    <label for="test1"></label>
</span>

CSS

span {
    background-color: #0f0;
    padding: .2em;
}

input {
    position: fixed;
    top: -100px;
}

label {
    display: inline-block;
    box-sizing: border-box;
    width: 1em;
    height: 1em;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 50%;
    vertical-align: middle;
}

:checked + span {
    background-color: #f00;
}

:checked + span > label {
    background: #888;
    box-shadow: #fff 0 0 0 .3em inset;
}