JSFiddle - React, Tailwind, and code Playground
by 3rror404
HTML
<button class="btn">Button</button>
CSS
.btn {
text-transform: uppercase;
font-weight: 600;
text-decoration: none;
padding: 8px 18px;
display: inline-block;
border: none;
border-radius: 5px;
transition: all 0.2s;
position: relative;
}
.btn::after {
content: "";
display: inline-block;
height: 100%;
width: 100%;
border-radius: 10rem;
position: absolute;
top: 0;
left: 0;
z-index: -1;
background: red;
}
.btn:hover::after {
transform: scale(2);
}