Duolith docs

Link

A text link in the primary colour; a link to another site shows an arrow that says so.

Stability: experimental

Props

PropTypeDefaultMeans
hrefstringA route in the app, or another site's address.
externalbooleanWhether it goes to another site. Left out, an http or https address on another origin is external; a path, a mailto, tel or sms address and an address on this site are not.
mutedbooleanfalseIn the muted colour, for a link in small print.

Children

The link's text.

States

StateLooks like
hoveredThe underline thickens.
pressed70% opacity.
focusedA 2px primary outline.
externalAn arrow pointing up and out after the text.

Accessibility

rolelink
nameIts text; an external link adds "opens another site".
focusTab reaches it.
keyboardEnter follows it.
notesA route in the app opens without reloading; another site opens with a full page load, as the router does for any link. Only paths and http, https, mailto, tel and sms addresses become links: any other scheme is E0170 written as text, and has no href when built from data.

Theme tokens

color.primary color.muted radius.xs

Example

<Link href="https://example.com/terms">Terms</Link>