JSFiddle - React, Tailwind, and code Playground
by Boba Poshtar
HTML
<ul>
<li>Step 1</li>
<li>Step 2</li>
<li class="active">Step 3</li>
<li>Step 4</li>
<li>Step 5</li>
</ul>
CSS
ul {
margin: 0;
padding: 0;
list-style: none;
width: 100%;
display: table;
table-layout: fixed;
}
li {
display: table-cell;
position: relative;
text-align: center;
}
li::before {
content: "";
position: absolute;
z-index: 10;
left: 50%;
top: 30px;
width: 20px;
height: 20px;
border: 3px solid orange;
border-radius: 50%;
transform: translate(-50%, 0);
background: #fff;
}
li:not(:first-child)::after {
content: "";
position: absolute;
width: 100%;
height: 2px;
right: 50%;
top: 42px;
background: orange;
}
li.active ~ li {
color: #999;
}
li.active ~ li::before {
border-color: #ff5;
}
li.active ~ li::after {
background-color: #ff5;
}