Sora UI

Draw Underline Link

A link with a hand-drawn SVG underline that animates on hover, powered by Motion. A React component.

Made by Axyl
Loading...

Link with a hand-drawn SVG underline that animates on hover — hover to see the stroke draw in.

Installation

npx shadcn@latest add @soralabs/draw-underline-link

File Structure

draw-underline-link.tsx

Usage

Props

PropTypeDefault
children?
string
-
label?
string
-
variant?
"default" | "sm" | "lg"
"default"
duration?
number
0.5
paths?
readonly string[]
-
underlineColor?
string
"currentColor"
className?
string
-
textClassName?
string
-
underlineClassName?
string
-

When to Use

Use DrawUnderlineLink for editorial body copy, blog post inline links, and marketing pages where you want links to feel crafted rather than mechanical. It works particularly well in large headline text or pull-quotes where the SVG stroke is clearly visible at the text size.

Avoid it for navigation menus, button-style links, or links inside dense paragraphs where the animation competes with surrounding content.

Accessibility

The component renders as a standard <a> tag. The SVG underline is aria-hidden and purely decorative — screen readers announce the link text without any mention of the animation. Keyboard focus shows the standard browser outline alongside the drawn underline. When prefers-reduced-motion: reduce is set, useReducedMotion() swaps the draw-in/draw-out animation for a static underline that just appears and disappears on hover — no extra configuration needed.

Credits

Inspired by Osmo. Reimplemented for Motion and React.

Built by Axyl. A motion-first component registry for React.

Last updated: 9/14/2026

On this page

Help keep SoraLabs moving.

Every contribution helps us build and maintain open-source tools for the community.

Sponsor on GitHub