Skip to content
GitHub (opens in a new tab)

Link

Text that navigates to another page or place: inline inside a sentence, standalone on its own line, or an announcement chip, with an external variant that opens a new tab.

stableAtomcontracts/link.json

Preview

Link

Text that navigates. Inline inside a sentence, standalone on its own line, a chip for an announcement, or external when it leaves the app. For actions, use Button.

An inline link keeps the sentence's type and stays underlined.

Read the billing guide before you change a plan.

Usage

The link text says where it goes. Pass linkAs (for example Next.js Link) for client-side routing.

Do's

  • Navigating to another page, section or site
  • A link inside running text (inline)
  • A link on its own line, under a card or in a short list (standalone)
  • A link that leaves the app (external)
  • An announcement chip above a hero title or in a banner ("New: Dashboard 2.0"): variant chip with a leading Badge md and a trailing aria-hidden ArrowRight

Don'ts

  • Running an action such as save, delete or open a dialog — use Button
  • A list of related links with descriptions — use LinkList
  • Primary site or app navigation — use SideNav (product), DocsNav (docs/catalog) or NavigationMenu
<p>Read the <Link href="/docs/billing">billing guide</Link> first.</p>

Standalone

<Link href="/settings/team" variant="standalone">Manage team</Link>

External

<Link href="https://status.example.com" external>status page</Link>
<Link href="https://example.com/changelog" variant="standalone" external>Changelog</Link>

Chip above a hero title

NewDashboard 2.0 is here

Every billing run, in one place

<Link href="/changelog" variant="chip" aria-label="New: Dashboard 2.0 is here, read the changelog">
  <Badge tone="brand" size="md">New</Badge>
  Dashboard 2.0 is here
  <ArrowRight size={16} aria-hidden="true" />
</Link>
<h1>Every billing run, in one place</h1>

Chip: changelog

<Link href="/changelog" variant="chip">
  <Badge tone="neutral" size="md">v0.31</Badge>
  See what changed
  <ArrowRight size={16} aria-hidden="true" />
</Link>

Chip: external

<Link href="https://status.example.com" variant="chip" external>
  <Badge tone="success" size="md" icon="CircleCheck">Live</Badge>
  Status page
</Link>

Chip in a narrow space

<Link href="/changelog/usage-billing" variant="chip">
  <Badge tone="brand" size="md">New</Badge>
  Usage-based billing now supports tiered and volume pricing
  <ArrowRight size={16} aria-hidden="true" />
</Link>
  • Navigating to another page, section or site
  • A link inside running text (inline)
  • A link on its own line, under a card or in a short list (standalone)
  • A link that leaves the app (external)
  • An announcement chip above a hero title or in a banner ("New: Dashboard 2.0"): variant chip with a leading Badge md and a trailing aria-hidden ArrowRight
  • Running an action such as save, delete or open a dialog — use Button
  • A list of related links with descriptions — use LinkList
  • Primary site or app navigation — use SideNav (product), DocsNav (docs/catalog) or NavigationMenu
import { Link } from "agentic-ds-kit";
must
  • A native a with href, so it is announced as a link and opens with Enter
  • Inline links are underlined so they are not told apart by colour alone
  • external adds target=_blank, rel=noopener noreferrer and visually hidden "(opens in a new tab)"; the icon is aria-hidden
  • focus-visible kit ring
  • chip is one native a and one tab stop; the Badge inside is a span and never focusable, and the trailing arrow is aria-hidden
  • chip takes its accessible name from its content; when the visible words do not say where it goes, pass aria-label that starts with the visible text (e.g. "New: Dashboard 2.0 is here, read the changelog")
  • chip keeps a 24px minimum hit target; use Badge size md, not sm
defaults
  • variant inline
  • external false
stops if
  • Do not use Link for actions; use Button
  • Do not style a Button to look like a link, or an a to look like a Button
  • Do not set target=_blank by hand; use external
  • Do not use raw hex
  • Do not put a Button, a second link or any other control inside a chip
  • Do not tint the chip pill; the tone lives on the Badge inside it
  • Do not build a local announcement pill; use Link variant chip

From contracts/link.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

NameTypeRequiredDefaultNotes
hrefstringYes——
childrennodeYes—The link text. Say where it goes; not "click here".
variantinline | standalone | chipNoinlineinline: underlined and inherits the surrounding font. standalone: body-sm label weight, underlined on hover. chip: announcement pill with a hairline border, surface fill and pill corner, 24px minimum height; put a kit Badge size md first (its tone carries the colour, the pill stays neutral; inside the chip it takes a pill corner and an even --space-1 inset so it nests in the outer pill) and an aria-hidden ArrowRight last. Text children become the message, which underlines on hover and ends in an ellipsis when there is no room. With external, leave the arrow off: the external icon replaces it.
externalbooleanNofalseOpens in a new tab (target=_blank, rel=noopener noreferrer), shows the ExternalLink icon and adds "(opens in a new tab)" for screen readers.
linkAscomponentNo—Router link to render instead of <a>, e.g. Next.js Link (same KitLinkComponent as Card and Cell). Ignored when external.
  • Component
    →

    Button

    Clickable action control with appearance × mode (plus an optional flat set) and a fixed set of sizes.

  • Component
    →

    LinkList

    A column of links, one a row with a chevron at the end, like an account's quick links.

  • Component
    →

    SideNav

    Product side nav: brand header, icon items, optional badges, closeable; variant single (one column that closes to an icon rail) or rail-subnav (a fixed icon rail plus a SideNav.SubNav column with the picked parent's rows).

  • Component
    →

    DocsNav

    Docs and catalog sidebar only: title, grouped text-only links, optional decorative icons and muted counts on group and subgroup headers only, an active page pill and optional footer links.