# Link element

Displays a link.

| | |
|---|---|
| **Available in** | Messages, Modals, Home tab |
| **Used in** | [Rich text section element](https://workstation.repzo.com/docs/developers/block-kit/rich-text/rich-text-section-element), [Rich text list element](https://workstation.repzo.com/docs/developers/block-kit/rich-text/rich-text-list-element), [Rich text quote element](https://workstation.repzo.com/docs/developers/block-kit/rich-text/rich-text-quote-element), [Rich text preformatted element](https://workstation.repzo.com/docs/developers/block-kit/rich-text/rich-text-preformatted-element) |

## Fields

| Field | Type | Description | Required? |
|---|---|---|---|
| `type` | String | The type of object; in this case, `link`. | Required |
| `url` | String | The link's URL. | Required |
| `text` | String | The text shown instead of the URL. If no text is provided, the URL is shown. | Optional |
| `unsafe` | Boolean | Whether the link is unsafe. | Optional |
| `from_llm` | Boolean | Whether the link was generated by an LLM. | Optional |
| `is_slack_url` | Boolean | Whether the link is a Slack URL. | Optional |
| `truncated` | Boolean | Whether the link has been truncated. | Optional |
| `style` | Object | An object of optional boolean properties that dictate style: `bold`, `italic`, `strike`, `highlight`, `client_highlight`, `underline` and `unlink`. | Optional |

> **How Repzo Chat differs from Slack**
>
> - Only `http` and `https` URLs become links; anything else shows as text without a link.
> - Links open in a new tab.
> - `style` supports `bold`, `italic`, `strike`, `underline` and `code`; `highlight`, `client_highlight` and `unlink` are ignored, as are `unsafe`, `from_llm`, `is_slack_url` and `truncated`.

## Examples

### A link with text

```json
{
  "blocks": [
    {
      "type": "rich_text",
      "elements": [
        {
          "type": "rich_text_section",
          "elements": [
            {
              "type": "text",
              "text": "The signed contract is in "
            },
            {
              "type": "link",
              "url": "https://example.com/contracts/cedar-2026",
              "text": "the Cedar Retail Group folder",
              "style": {
                "bold": true
              }
            },
            {
              "type": "text",
              "text": "."
            }
          ]
        }
      ]
    }
  ]
}
```

## Related

- [Rich text elements](https://workstation.repzo.com/docs/developers/block-kit/rich-text)
- [Block Kit overview](https://workstation.repzo.com/docs/developers/block-kit)
