Link
Opt-in styling for anchors. Add .re-link to any <a> and pick a variant with data-variant.
Default
Section titled “Default”Read the foundation page for token details.
<p>
Read the
<a href="./foundation.html" class="re-link" id="link-default">foundation page</a>
for token details.
</p> Quiet inline link: view button.
<p>
Quiet inline link:
<a href="./button.html" class="re-link" data-variant="muted" id="link-muted">view button</a
>.
</p> Subtle
Section titled “Subtle”Underline appears on hover only: back to index.
<p>
Underline appears on hover only:
<a href="./index.html" class="re-link" data-variant="subtle" id="link-subtle"
>back to index</a
>.
</p> External
Section titled “External”Visit MDN HTML reference for native element semantics.
<p>
Visit
<a
href="https://developer.mozilla.org/en-US/docs/Web/HTML"
class="re-link"
data-variant="external"
target="_blank"
rel="noopener noreferrer"
id="link-external"
>MDN HTML reference</a
>
for native element semantics.
</p> Accessibility
Section titled “Accessibility”- Keyboard — Native anchor behavior: Tab moves focus to the link, Enter follows the
href..re-linkis styling only and adds no extra keys or behaviors. - Focus — A visible
:focus-visiblering (--re-shadow-focus, withoutline: none) marks the focused link, so it stays distinguishable inline within body text. - Semantics — A plain
<a href>; assistive tech announces it as a link and reads its visible text as the accessible name. Theexternalvariant should open in a new context withtarget="_blank"plusrel="noopener noreferrer", as shown above. - Notes — The
externalvariant’s↗glyph is a decorative CSS::afterhint; it is not part of the accessible name (give the link descriptive text and, if needed, your ownaria-label). See the accessibility guide.