Link

Links use the accent color, which is the theme color in oklch unless you set --secondary yourself.

ClassDoes what
linkAccent-colored text with a pointer cursor

Basic

<div class="prose">
  <p>Read the <a href="#" class="link">installation guide</a> to get started.</p>
</div>

Recoloring

Set --secondary on any ancestor to change links in that subtree.

<div class="prose">
  <p class="retheme" style="--secondary: teal">A <a href="#" class="link">teal link</a> inside a scoped block.</p>
</div>

Unstyled links

<a href="#" class="semantic">No accent color, no underline</a>

.semantic exists in both builds. Note that it unsets every property, including the focus ring, so leave it off anything the keyboard needs to reach.

Composition

Common ways to put this together with other components. The general rules are on Composition.

Links in a footer

A column of site links, and a line of contact links. Links navigate, so there is no button here.

Same markup in both builds
<footer>
  <hr class="divider" />
  <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--padding)">
    <div>
      <strong>Studio name</strong>
      <p class="text-secondary">A short line about what you do.</p>
      <div class="flex">
        <a href="#" class="link">Email</a>
        <a href="#" class="link">Social</a>
      </div>
    </div>
    <nav class="flex" style="flex-direction: column; gap: calc(var(--padding) / 4)">
      <a href="#" class="link">Work</a>
      <a href="#" class="link">Writing</a>
      <a href="#" class="link">About</a>
      <a href="#" class="link">Contact</a>
    </nav>
  </div>
</footer>

A whole card as a link

When a card has one destination, the card is the link. .semantic strips the anchor's own styling, and the title takes .link so the card still looks clickable.

Same markup in both builds
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--padding)">
  <a href="#" class="semantic card prose">
    <h3 class="link">Project one</h3>
    <p>What it was, in a sentence.</p>
  </a>
  <a href="#" class="semantic card prose">
    <h3 class="link">Project two</h3>
    <p>What it was, in a sentence.</p>
  </a>
</div>