JSFiddle - React, Tailwind, and code Playground
by hmdadou
HTML
<div class="purrtable">
<input type="radio" name="leftChannel" class="left-channel-button" value="audio/wandering.mp3" />
<label for="leftChannel">Left</label>
<input type="radio" name="rightChannel" class="right-channel-button" value="audio/wandering.mp3" />
<label for="rightChannel">Right</label>
</div>
CSS
.purrtable {
margin: 10px;
}
.purrtable input[type="radio"] {
opacity: 0;
position: fixed;
width: 0;
}
.purrtable label {
display: inline-block;
background-color: #ddd;
padding: 10px 20px;
font-family: sans-serif, Arial;
font-size: 16px;
border: 2px solid #444;
border-radius: 4px;
}
.purrtable label:hover {
background-color: #dfd;
}
.purrtable input[type="radio"]:focus + label {
border: 2px dashed #444;
}
.purrtable input[type="radio"]:checked + label {
background-color: #bfb;
border-color: #4c4;
}