JSFiddle - React, Tailwind, and code Playground

by Michel Penke

HTML

<input type="radio" id="grundschule" class="input__schulform" name="schulform" checked>
<label for="grundschule" class="label__schulform">Grundschule</label>

<input type="radio" id="realschule" class="input__schulform" name="schulform">
<label for="realschule" class="label__schulform">Realschule</label>

<input type="radio" id="gymnasium" class="input__schulform" name="schulform">
<label for="gymnasium" class="label__schulform">Gymnasium </label>

<input type="radio" id="foerderschule" class="input__schulform" name="schulform">
<label for="foerderschule" class="label__schulform">Förderschule</label>

CSS

.input__schulform {
    position: absolute !important;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    width: 1px;
    border: 0;
    overflow: hidden;
}

.label__schulform {
    border: 0;
    padding: 10px 30px 10px 40px;
    background: gray;
    color: white;
    border-radius: 50px;
    position: relative;
    margin: 20px 5px;
    min-width: 160px;
}

.label__schulform:hover {
    cursor: pointer;
}

input:checked + .label__schulform {
    background: red;
    color: white;
}