A link underline that behaves like a plucked string. It bends toward the pointer on a spring, follows it along the word and rings out when the pointer leaves. Wrap any text or link; reduced motion keeps a straight line.
npx shadcn@latest add https://hyperblur.dev/r/hover-string-underline.jsonWorks in any React project set up with the shadcn CLI. The file lands in components/hyperblur/hover-string-underline.tsx.
import { HoverStringUnderline } from "@/components/hyperblur/hover-string-underline"
<HoverStringUnderline className="text-2xl font-semibold"><a href="/docs">Read the docs</a></HoverStringUnderline>| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | "Hover the string" | Text or link to underline. |
| color | string | "currentColor" | Stroke color of the string. |
| thickness | number | 2 | Stroke width in pixels. |
| strength | number | 1 | How far the string bends toward the pointer. |
| stiffness | number | 0.14 | Spring pull. Higher snaps back faster. |
| damping | number | 0.9 | Spring friction. Lower rings longer. |