Skip to content
Fleetline

Link

Usage

Use a link to go somewhere: another page, a section, a document. If it changes data or opens a dialog, it's a button. Never put href="#" on something that runs JavaScript.

Anatomy

  1. Anchor — <a class="link" href>
  2. Label — the visible text, which is the accessible name
  3. Icon (optional) — svg.link__icon: arrow for standalone, external-link for new tabs
  4. Hidden hint (external) — <span class="sr-only"> (opens in new tab)</span>

Examples

States marked hover, focus-visible and active are frozen with .is-hover, .is-focus-visible, .is-active. Those classes share their rule with the real pseudo-class, so what you see is exactly what users get. Never use them in product code. .is-visited freezes the visited color.

API

HookValuesPurpose
.linkblock classInline, underlined link
.link--standalonemodifierSemibold, no underline until hover, optional arrow
.link--externalmodifierWith external icon + hidden "(opens in new tab)"
.link--subtlemodifierInherits text color (tables)
.link__iconpartTrailing icon
.is-hover | .is-focus-visible | .is-active | .is-visiteddocs-only classFreeze a state

Do and don't

Read the brake inspection checklist.

Do write link text that names the destination.

For the checklist, go here.

Don't use "here" or "more" — screen-reader link lists lose the context.

Accessibility

Keyboard interaction
KeyBehavior
TabMoves focus to the link
EnterFollows the link (Space scrolls the page — that's why actions are buttons)

Tokens

Custom propertyPurpose
--color-text-linkLink color
--color-text-link-visitedVisited color
--border-width-thin | -thickUnderline thickness, rest / hover
--color-selected-bgActive (pressed) highlight
--icon-size-smIcon
--focus-ring-*Focus ring