Link
A text link in the primary colour; a link to another site shows an arrow that says so.
Stability: experimental
Props
| Prop | Type | Default | Means |
|---|---|---|---|
href | string | A route in the app, or another site's address. | |
external | boolean | Whether 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. | |
muted | boolean | false | In the muted colour, for a link in small print. |
Children
The link's text.
States
| State | Looks like |
|---|---|
hovered | The underline thickens. |
pressed | 70% opacity. |
focused | A 2px primary outline. |
external | An arrow pointing up and out after the text. |
Accessibility
| role | link |
| name | Its text; an external link adds "opens another site". |
| focus | Tab reaches it. |
| keyboard | Enter follows it. |
| notes | A 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>