JSFiddle - React, Tailwind, and code Playground

by Malitta Nan

HTML

<input type="radio" name="rd" id="choice1" value="1"> 
<label for="choice1" >Choice 1</label>

<input type="radio" name="rd" id="choice2" value="2">
<label for="choice2" >Choice 2</label>

<input type="radio" name="rd" id="choice3" value="3">
<label for="choice3" >Choice 3</label>

CSS

label { display : inline-block; 
        padding : 2px 5px;
        border: 1px #b6b6b6 outset; }

input[type="radio"] { display: none; }
input[type="radio"]:checked + label { border: 1px #b6b6b6 inset; }