JSFiddle - React, Tailwind, and code Playground

by gsv60

HTML

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="style.css" media="all">
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap" rel="stylesheet">
    <title>Document</title>
</head>
<body>
    <div class="steps">
            <input name="step1" type="checkbox" class="timeline" id="first">
            <label class="time__lab-first" for="first"></label>

            <input name="step2" type="checkbox" class="timeline" id="second">
            <label label="Step 2" class="time__lab" for="second"></label>

            <input name="step3" type="checkbox" class="timeline" id="third">
            <label label="Step 3" class="time__lab-last" for="third"></label>
    </div>
</body>
</html>

CSS

.steps{
    display: -webkit-inline-box;
    margin: 10px 10px;
}
.timeline{
    display: none;
    position: relative;
}
.time__lab{
    border: 1px solid grey;
    width: 200px;
    position: relative;
    margin-left: 13px;
    margin-top: 40px;
    display: block;
}
.time__lab-first{
    border: 1px solid grey;
    width: 200px;
    position: relative;
    margin-left: 13px;
    margin-top: 40px;
    display: block;
}
.time__lab-last{
    border: 1px solid grey;
    width: 200px;
    position: relative;
    margin-left: 14px;
    margin-top: 40px;
    display: block;
}
.time__lab:before{
    content: "";
    display: block;
    border: 1px solid grey;
    border-radius: 4px;
    width: 6px;
    height: 6px;
    position: absolute;
    left: -11px;
    bottom: -4px;
}
.time__lab-first:before{
    content: "";
    display: block;
    border: 1px solid orange;
    background-color: orange;
    border-radius: 4px;
    width: 6px;
    height: 6px;
    position: absolute;
    left: -11px;
    bottom: -4px;
}
.time__lab-last:before{
    content: "";
    display: block;
    border: 1px solid grey;
    border-radius: 4px;
    width: 6px;
    height: 6px;
    position: absolute;
    left: -10px;
    bottom: -4px;
}
.time__lab-first::after{
    content: "";
    display: block;
    border: 1px solid orange;
    background-color: orange;
    border-radius: 4px;
    width: 6px;
    height: 6px;
    display: none;
    position: absolute;
    right: -12px;
    bottom: -4px;
} 
.time__lab::after{
    content: "";
    display: block;
    border: 1px solid grey;
    border-radius: 4px;
    width: 6px;
    height: 6px;
    position: absolute;
    right: -12px;
    bottom: -4px;
}
.time__lab-last::after{
    content: "";
    display: block;
    border: 1px solid grey;
    border-radius: 4px;
    width: 6px;
    height: 6px;
    position: absolute;
    right: -11px;
    bottom: -4px;
}

.timeline:checked+.time__lab{
    color: green;
    border-color: green;
    background-color:...