27 CSS Button Hover Effects 23 / 27

Icon Slide In

An arrow slides in from outside as the button padding expands to make room for it.

Pure CSS MIT licensed
Live Demo Open in tab
Open in playground

The code

<button class="bhe-23__btn">Get Started<span class="bhe-23__icon">→</span></button>
.bhe-23__btn {
  padding: 12px 32px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.02em;
  background: transparent;
  color: inherit;
}

.bhe-23__btn {
  position: relative;
  overflow: hidden;
  transition: padding 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.bhe-23__icon {
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition:
    right 0.35s cubic-bezier(0.23, 1, 0.32, 1),
    opacity 0.3s;
}
.bhe-23__btn:hover {
  padding-right: 52px;
}
.bhe-23__btn:hover .bhe-23__icon {
  right: 16px;
  opacity: 1;
}

Search CodeFronts

Loading…