Icon Slide In
An arrow slides in from outside as the button padding expands to make room for it.
Icon Slide In the 17th of 21 designs in the 21 CSS Button Hover Effects collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.
Live preview
The code
<button class="bhe-17__btn">Get Started<span class="bhe-17__icon">→</span></button>
.bhe-17__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-17__btn {
position: relative;
overflow: hidden;
transition: padding 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.bhe-17__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-17__btn:hover {
padding-right: 52px;
}
.bhe-17__btn:hover .bhe-17__icon {
right: 16px;
opacity: 1;
}