JSFiddle - React, Tailwind, and code Playground

by Bar Hatsor

HTML

<a href="#" class="btn--tertiary">Button</a>

CSS

html,
body {
  margin: 0;
  padding: 0;
}

a.btn--tertiary {
  padding-left: 0;
  padding-right: 0;
  background-color: transparent;
  color: #000;
  border: 0;
  position: relative;
  padding-bottom: 5px;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 40px;
}

.btn--tertiary::before {
  content: '';
  height: 2px;
  right: 0;
  width: 100%;
  background: #000;
  position: absolute;
  bottom: 0;
  transition: width 0s;
  z-index: 2;
  border-left: 10px solid transparent;
}

.btn--tertiary::after {
  content: '';
  height: 2px;
  left: 0;
  right: auto;
  width: 0%;
  background: grey;
  position: absolute;
  bottom: 0;
  opacity: 0;
  transition: opacity .5s, width 0s .5s;
  z-index: 3;
}
  
.btn--tertiary:hover:before,
.btn--tertiary:focus:before {
  width: 0%;
  border-left: 20px solid $white;
  transition: width 1s cubic-bezier(0.100, 0.600, 0.350, 1.000) 0s;
}

.btn--tertiary:hover::after,
.btn--tertiary:focus::after {
  right: 0;
  width: 100%;
  opacity: 1;
  transition: opacity 0s, width 1s cubic-bezier(0.100, 0.600, 0.350, 1.000) 0.1s;
}