JSFiddle - React, Tailwind, and code Playground

by fest1val

HTML

<body>
  <a class="auth" href="#"><span class="t-s">Sign In</span></a>
</body>

CSS

a{
  text-decoration: none;
  color: #fff;
}
.auth{
  display: inline-block;
  text-transform: uppercase;
  background: #fff;
  color: #000;
  border: 2px solid #262626;
  padding: 8px;
  position: relative;
  overflow: hidden;
  transition: .5s ease-in-out;
}
.auth::before{
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #ff003b;
  transition: .5s ease-in-out;
  z-index: -1;
}
.auth:hover::before{
  left: 0;
  z-index: -1;
}
.t-s{
  color: #262626;
  transition: .5s ease-in-out;
  z-index: 1;
}
.auth:hover .t-s{
  color: red;
}
.auth:hover {
  background: blue;
}