Link
Text that goes somewhere. It renders a plain anchor, and an app with a router passes its own link component through render, which is what keeps the design system free of any framework.
Reach for it
Going somewhere: a URL, a route, a document.
Not for
Firing an action. That is a Button.
Tones and sizes
Plain inherits the colour around it, for a link inside a sentence that should not interrupt it. Subtle suits a link in a dense row. Anything that changes data rather than the location is a Button, whatever it looks like.
Leaving the product
isExternal opens a new tab and sets rel=noreferrer noopener, which are not the caller's to override: without them the opened page can reach back through window.opener. It also draws the mark, and the label that names it is required, so the new tab is announced rather than only drawn.
The mark travels with the last word, so a link that wraps mid-sentence keeps it. Read the supplier terms and conditions opens in a new tab before signing the mandate.
API reference
Link
| Prop | Type | Default | Description |
|---|---|---|---|
| isExternal* | true | - | |
| externalLabel* | string | - | Announces where the link goes, e.g. "opens in a new tab". |
| tone | 'default' | 'subtle' | 'plain' | 'pill' | default | |
| size | 'small' | 'medium' | 'large' | 'inherit' | inherit | |
| render | ReactElement | - | An app's router link, rendered in place of the anchor. |
Also takes the standard attributes of a a, minus className, style, target and rel.