# Text link

Text that goes somewhere or does something, with no button shape round it.

This is the HTML to build it with `dex.css`, for work outside the Dex codebase. Read https://brand.meetdex.ai/design.md first: it says how to set up a page and how to use the stylesheet. The page at https://brand.meetdex.ai/components/text-link shows the Dex app's own React component, which only works inside the Dex codebase.

## HTML

```html
<a class="dex-link" href="/privacy">Privacy</a>
<p class="dex-small dex-muted">Read the <a class="dex-link dex-link--inline" href="/privacy">privacy policy</a>.</p>
<a class="dex-link dex-link--foreground" href="/roles/synthesia">Synthesia</a>
<a class="dex-link dex-link--brand" href="/matches">See your matches →</a>
```

- **Muted** (`dex-link` alone) is the default, for footers, navs and secondary actions. It turns to the text colour on hover.
- **Inline** (`--inline`) is a link inside muted copy, such as helper text: underlined at rest so it still reads as a link.
- **Foreground** (`--foreground`) is a name or title that links somewhere.
- **Brand** (`--brand`) is the one orange link in a view, leading into the main conversion.
- **As an action**: with nowhere to go it's a `<button type="button" class="dex-link">`, for something such as resending an email or opening a dialog. `dex.css` doesn't dim a disabled one, so while it runs add `disabled` and `style="opacity: 0.5"`.
- **Opening a new tab**: `target="_blank" rel="noreferrer"`, with ↗ after the label.
- **An icon**: a Lucide `<svg>` after the label, sized to 14px by the link.

## States

- Focus: a 1px outline 2px out, in the 75% control colour, so it never cuts into the letters.

## Rules

- A text link has no padding or height of its own, so it sits in a line of copy, a footer or a nav. Anything with a button's height is a button, including `dex-button--link`.
- Muted is the default. Brand is for one link in a view; everything else is muted.
- An action with nowhere to go is a `<button>`, never an `<a href="#">`.
- An arrow after the label: → for a page on the same site, ↗ only for a link that opens a new tab.
- The label says where it goes or what it does ("See your matches"), never "Click here" or "Learn more".
