JSFiddle - React, Tailwind, and code Playground
HTML
<button class="btn">Me too</button>
CSS
.btn {
border: 1px solid red;
color: red;
background: none;
padding: 25px 70px;
display: inline-block;
position: relative;
transition: opacity 0.3s linear !important;
}
.btn:after {
content: '';
position: absolute;
z-index: -1;
transition: all 0.3s;
width: 0%;
height: 100%;
top: 0;
left: 0;
background: #000;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform-origin: right;
transform: scale(0,1);
transition: transform 0.38s cubic-bezier(.2,0.95,.4,0.95), background-size 0.38s ease;
z-index: -1;
}
.btn:before {
speak: none;
}
/* Button 1 */
.btn:hover {
color: #fff;
}
.btn:hover:after {
width: 100%;
transform: scale(1,1);
transform-origin: left;
background-position: left!important;
background-size: 100% 100%!important;
}