> 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',
  linkOnly: true,
})
```

## Options

| Option         | Type      | Required | Description                                                                                                                |
| -------------- | --------- | -------- | -------------------------------------------------------------------------------------------------------------------------- |
| `label`        | `string`  | Yes      | Label shown to editors in Strife Studio.                                                                                   |
| `description`  | `string`  | No       | Tooltip shown to editors.                                                                                                  |
| `localizable`  | `boolean` | No       | When `true`, output is `Record<string, Link>` instead of `Link`.                                                           |
| `searchable`   | `boolean` | No       | Include in the team's search index.                                                                                        |
| `filterable`   | `boolean` | No       | Allow filtering content lists by this value.                                                                               |
| `protected`    | `boolean` | No       | Restrict editing to users with the appropriate permission.                                                                 |
| `propertyName` | `string`  | No       | Override the stored property name.                                                                                         |
| `linkOnly`     | `boolean` | No       | When `true`, the editor shows only the URL field (no link-text input). Use for href-only references like download buttons. |

## Output type

`Link`, or `Record<string, Link>` when `localizable: true`. `href`/`target` are always present; `id` is set only for internal-document links (the content index resolves `href` from it); `text` is absent when `linkOnly: true`.

## See also

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