Skip to content

Underline Draw Effect

A link with an animated underline that draws from left to right on hover with a gradient stroke.

Underline Draw Effect

by FreeCsStyles Dev's

Hover EffectsMinimal
🌐
#underline#draw#link#animated

Embed this component

Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/underline-draw-effect.

<iframe src="/embed/underline-draw-effect" sandbox="allow-scripts" loading="lazy" title="Underline Draw Effect" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>

Implementation code

Copy the HTML and CSS for Underline Draw Effect. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.

HTML
<nav class="underline-nav">
  <a href="#" class="underline-link">Home</a>
  <a href="#" class="underline-link active">About</a>
  <a href="#" class="underline-link">Services</a>
  <a href="#" class="underline-link">Contact</a>
</nav>
CSS
.underline-nav { display: flex; gap: 28px; }

.underline-link {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

.underline-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.underline-link:hover {
  color: #fff;
}

.underline-link:hover::after,
.underline-link.active::after {
  width: 100%;
}

.underline-link.active {
  color: #fff;
}

Where Underline Draw Effect fits

  • Navigation Links
  • CTA Text
  • Menu Items

Topics

  • #underline
  • #draw
  • #link
  • #animated