Back to CSS Button Hover Effects Split Reveal Pure CSS
Share
HTML
<button class="bhe-05__btn">
  <span class="bhe-05__top">Split Reveal</span>
  <span class="bhe-05__bottom" aria-hidden="true">Split Reveal</span>
</button>
CSS
.bhe-05__btn {
  padding: 12px 32px;
  font-family: inherit;
  border-radius: 8px;
  letter-spacing: 0.02em;
  background: transparent;
  color: inherit;
}

.bhe-05__btn {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #17171f;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.bhe-05__top {
  display: block;
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.bhe-05__bottom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7c6cff;
  clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
  transform: translateY(50%);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.bhe-05__btn:hover .bhe-05__top {
  transform: translateY(-50%);
}
.bhe-05__btn:hover .bhe-05__bottom {
  transform: translateY(0);
}