JSFiddle - React, Tailwind, and code Playground
HTML
<div class="buttons">
<label><input type="radio" name="radiobutton"><span tabindex="1">Left</span></label>
<label><input type="radio" name="radiobutton"><span tabindex="2">Middle</span></label>
<label><input type="radio" name="radiobutton"><span tabindex="3">Right</span></label>
</div>
CSS
html {
font: 16px tahoma, "Times New Roman", serif;
color: #333;
}
.buttons {
font-size: 0px; /* чтобы убить пробелы между инпутами */
}
.buttons label {
font-size: 16px;
}
.buttons input[type="checkbox"],
.buttons input[type="radio"] {
display: none;
}
.buttons label span {
display: inline-block;
padding: 3px 12px;
border: 1px solid #bbb;
text-align: center;
line-height: 32px;
border-right: none;
cursor: pointer;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
}
.buttons label span:hover {
box-shadow: inset 0 2px 8px #D2D2D2;
-moz-box-shadow: inset 0 2px 8px #D2D2D2;
-webkit-box-shadow: inset 0 2px 8px #BBB;
}
.buttons label input[type="checkbox"]:checked + span,
.buttons label input[type="radio"]:checked + span {
background-color: #E6E6E6;
}
.buttons label:first-child span {
border-top-left-radius: 6px;
-webkit-border-top-left-radius: 6px;
-moz-border-radius-topleft: 6px;
border-bottom-left-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
}
.buttons label:last-child span {
border-top-right-radius: 6px;
-webkit-border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
border-bottom-right-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
-moz-border-radius-bottomright: 6px;
border-right: 1px solid #bbb;
}