Skip to content

Link

Text that takes the person somewhere. It reads as text with a line under it. With external it opens in a new tab and says so.

import { Link } from '@sypnia/ui/react'

On this page
  1. In a sentence
  2. When to use it
  3. For everyone
  4. Props

In a sentence

Rows are kept for 30 days. Change how long or read how backups work (opens in a new tab).

Last change by Ana · See the history

Code
import { Link } from '@sypnia/ui/react';

// Links read as text with a line under them. An external one says it opens a new tab.
export default function InText() {
  return (
    <div className="sy-stack">
      <p>Rows are kept for 30 days. <Link href="#retention">Change how long</Link> or read <Link href="https://docs.sypnia.com" external>how backups work</Link>.</p>
      <p className="sy-text--muted">Last change by Ana · <Link href="#history" muted>See the history</Link></p>
    </div>
  );
}

When to use it

Use it when

  • Inside sentences and next to values: «See the history», «how backups work».
  • muted for links in secondary text.

Do not use it when

  • Actions that change something here: use a Button.
  • Links that look like buttons: use LinkButton.

For everyone

  • The text says where it goes; never «click here».
  • An external link has an arrow and the words «opens in a new tab» for screen readers.
  • It is underlined, so it is not told apart by colour alone.

Props

LinkTypeDefault
hrefrequired string
external boolean
muted boolean
onClick (() => void)
  1. In a sentence
  2. When to use it
  3. For everyone
  4. Props

    Search pages, sections and terms