UnderlineLink

The underline draws in from the left and leaves out the right, so it always travels the way you moved. Text.

Open playground

About

UnderlineLink is a React component in the Text category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { UnderlineLink } from "@ashutoshswamy/smoui" and set arrow, ...anchor.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { UnderlineLink } from "@ashutoshswamy/smoui";

<UnderlineLink href="/changelog" arrow>Read the changelog</UnderlineLink>

Props 2

arrow

Arrow that nudges forward on hover.

booleandefault false
...anchor props

href, target and the rest pass through.

AnchorHTMLAttributes