Link underline on hover

Link whose underline draws in from the left on hover.

CSS onlyHoverAnimation
BackgroundGridAccent

Corners

SharpDefaultRound

Shadow

NoneNoneStrong

Motion

NoneDefaultBounce
<style>
.ux-lnk-h{display:inline-flex;align-items:center;padding-bottom:2px;color:var(--accent,#cc4a26);font:500 16px system-ui;text-decoration:none;border-radius:calc(4px * var(--r,1));background:linear-gradient(currentColor,currentColor) 0 100%/0 1.5px no-repeat;transition:background-size var(--dur,.25s) var(--ease,ease)}
.ux-lnk-h:hover{background-size:100% 1.5px}
.ux-lnk-h:focus-visible{outline:2px solid var(--accent,#cc4a26);outline-offset:3px}
</style>

<a href="#" class="ux-lnk-h">Read the documentation</a>

When to use it

Use this to help people move around your product or understand where they are, rather than to submit data or trigger a one-off action.

Accessibility

Check that it reaches every state with the keyboard alone before you ship it, and keep the focus ring instead of removing it for looks. It has no JavaScript dependency, so it keeps working if a script fails to load, and it is built on native form controls or semantics rather than divs pretending to be one. Colors are read from CSS custom properties, so they follow your light or dark theme and you can raise contrast globally without touching this component.