# Link usage guidelines

> Discover Cimpress UI's link component.

Source: https://ui.cimpress.io/components/link/

Links are used inline with text to let users navigate to other pages.

### When to use

- To provide a navigational action inline with other text.
- To provide a navigational action where space is limited, like in a [card](/components/card).

### When not to use

- Links are only used for navigational actions. For any other actions, use [buttons](/components/button) instead.
- For actions that are important or critical use [buttons](/components/button) instead.
- For actions that are isolated in a UI or are not grouped with text elements, use [buttons](/components/button) instead.

## Formatting and layout

### Placement

Links are typically placed inline with other paragraph and text elements to conveniently provide navigation to users. Links maintain the same size, line height, and alignment as the text they are placed with.

Links should maintain the same spacing as the text they are next to. Do not add additional spacing between links and any surrounding text.

**Do:**

```tsx
import { Text, Link } from '@cimpress-ui/react';

export default function Demo() {
  return (
    <Text as="p">
      Read the <Link href="#">product documentation</Link> or reach out to Platform Support for help.
    </Text>
  );
}
```

**Don't:**

```tsx
import { Text, Link } from '@cimpress-ui/react';

export default function Demo() {
  return (
    <Text as="p">
      Read the{' '}
      <Link href="#" UNSAFE_style={{ marginInline: 8 }}>
        product documentation
      </Link>{' '}
      or reach out to Platform Support for help.
    </Text>
  );
}
```

### Icon alignment

Links can include icons at the start or the end of the link, but only one icon should be used in a link. Use icons sparingly and ensure the icon's meaning is both obvious and adds value to the link.

**Do:**

```tsx
import { Text, Link } from '@cimpress-ui/react';
import { IconAppWindowNext } from '@cimpress-ui/react/icons';

export default function Demo() {
  return (
    <Text as="p">
      All columns have to be assigned to continue to the next step.{' '}
      <Link href="#" iconEnd={<IconAppWindowNext />}>
        Learn more
      </Link>
    </Text>
  );
}
```

**Don't:**

```tsx
import { Text, Link } from '@cimpress-ui/react';
import { IconAppWindowNext } from '@cimpress-ui/react/icons';

export default function Demo() {
  return (
    <Text as="p">
      All columns have to be assigned to continue to the next step.{' '}
      <Link href="#" iconStart={<IconAppWindowNext />} iconEnd={<IconAppWindowNext />}>
        Learn more
      </Link>
    </Text>
  );
}
```

## Content writing

- Do be descriptive but also concise.
- Do not say “Click here” as part of the link text. Instead, just state what the user will find at that link or use phrases like “Learn more” if you can’t be specific.
- If a page has multiple links, the link text should be unique for each link.
