The arrow nudges to the right when you hover, which is enough to say 'this goes somewhere'. Works for any inline icon, not just an arrow.
Also known as: arrow button hover, moving arrow.
<button class="hfx-icon-slide">Continue <span aria-hidden="true">→</span></button>
.hfx-icon-slide {
--c: var(--hfx-color, #3b82f6);
font-size: var(--hfx-size, 16px);
display: inline-flex;
align-items: center;
gap: 0.5em;
padding: 0.7em 1.6em;
border-radius: 0.5em;
font: 600 1em system-ui, sans-serif;
cursor: pointer;
border: 0;
background: var(--c);
color: #fff;}
.hfx-icon-slide span {
display: inline-block;
transition: transform 0.25s ease;
}
.hfx-icon-slide:hover span { transform: translateX(0.3em); }
@media (prefers-reduced-motion: reduce) {
.hfx-icon-slide, .hfx-icon-slide *, .hfx-icon-slide::before, .hfx-icon-slide::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}The same effect using Tailwind utility classes. No custom CSS or config needed.
<button class="group inline-flex items-center gap-2 rounded-lg bg-blue-500 px-6 py-3 font-semibold text-white"> Continue <span class="transition-transform duration-200 group-hover:translate-x-1">→</span> </button>
--hfx-color on the element or a parent.
Currently previewing #3b82f6.--hfx-size. Every other dimension is in
em, so the whole thing scales together. Currently previewing 16px.transition or animation
shorthand. Staggered delays are relative, so they keep their rhythm.