> From the [Strife developer docs](https://strife.app/docs/reference/field-reference/fields.link). Every page is listed in [llms.txt](https://strife.app/docs/llms.txt).

# fields.link()

Hyperlink reference, either internal (document) or external.

Hyperlink reference. Maps to editor `{ name: 'str-link', type: 'link' }`. Output is the canonical `Link` from `@strifeapp/types`.

## Example

```ts
fields.link({
  label: 'CTA link',
  localizable: true,
})

fields.link({
  label: 'Download URL',
})
```

## Options

| Option         | Type      | Required | Description                                                                                                                |
| -------------- | --------- | -------- | -------------------------------------------------------------------------------------------------------------------------- |
| `label`        | `string`  | Yes      | Label shown to editors in Strife Studio.                                                                                   |
| `localizable`  | `boolean` | No       | When `true`, output is `Record<string, Link>` instead of `Link`.                                                           |
| `propertyName` | `string`  | No       | Override the stored property name.                                                                                         |

## Output type

`Link`, or `Record<string, Link>` when `localizable: true`. `href`/`target` are always present; `id` is set when the link points at a page or at one of the team's files (for a page, the content index resolves `href` from it).

## See also

* [The Link field in Studio](https://strife.app/docs/reference/fields/link.md): the same editor, documented from the Strife Studio UI side.
