A link with a hand-drawn SVG underline that animates on hover, powered by Motion. A React component.
Made by AxylInstallation
File Structure
Usage
Props
| Prop | Type | Default |
|---|---|---|
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: 7/26/2026