# Link

An underlined inline link for text outside prose.

Source: https://www.zazz.sh/api/primitives/link/

## Installation

```bash
pnpm dlx zazz-ui add link
```

Run `zazz-ui init` first if the project has no `zazz/` folder yet.

## Examples

### Default

```html
<p>
  Read the
  <a href="#" data-ui="link">authoring guide</a>
  before you write markup.
</p>
```

## Usage

Links inside [prose](/api/primitives/prose/) are underlined for you. Anywhere else, give an inline link the `link` identity. It underlines in the text's own color, at the `--decoration-thickness` and `--decoration-offset` tokens, and fades the underline on hover.

```html
<a href="/docs/" data-ui="link">Read the docs</a>
<a href="/terms/" data-ui="link" data-font="sm">Terms</a>
```

Set the color with the `--text` utility, and remove the underline with `--text-decoration: none`. A link that acts like a control is a [button](/api/primitives/button/) with the `link` variant.
