Use Link inside prose and short supportive sentences.
Link
Inline text link with a border-bottom underline. Supports an external variant that opens in a new tab and surfaces a directional arrow.
- .source-link Label and underline treatment
-
border-bottom
1px underline using
--source-link-border-color - .source-link-icon External destination indicator
States
--source-color-border-strong.
--source-color-text, reinforcing the link intent.
rel="noopener noreferrer".
Design intent
Link navigates. If clicking it does not change the URL or scroll position, it should be a Button instead. The external prop adds both the right visual cue and the correct rel attributes automatically. Mark every third-party destination as external so users know before they leave.
When to use
Set external for third-party links so users know they leave the app.
Write labels that make sense out of context.
Do not use Link for in-place actions. Use Button.
Avoid generic labels that lose meaning when isolated.
Do not mark internal routes as external.
External links
The external prop signals to the reader that following the link will leave the current context. Reserve it for genuinely external destinations. Overusing it trains users to ignore the icon.
<Link href="/path"> without external.
<Link href="https://..." external> to show the outbound arrow and open a new tab safely.
Designer checklist
- Link text makes sense out of context. Not 'click here' or 'read more'.
- External links use the
externalprop and open in a new tab. - Color contrast meets WCAG AA in both default and hover states.
- Links do not look like buttons and vice versa.
Props
rel="noopener noreferrer", and appends the arrow icon.
Usage
import '@pierredelattre/source-tokens';
import '@pierredelattre/source-react/styles';
import { Link } from '@pierredelattre/source-react';
function Demo() {
return (
<p>
See the <Link href="/docs">documentation</Link> for details.
Built with <Link href="https://react.dev" palette="accent" external>React</Link>.
</p>
);
}
Component tokens
Defined on .source-link. Override on a parent selector to restyle in a specific context.
.footer .source-link {
--source-link-color: var(--source-color-text-secondary);
--source-link-border-color: var(--source-color-border);
}
Semantics
external is true. Opens in a new browsing context.
window.opener and suppresses the referrer header.