Documentation

linkElement
Question mark

Links to a URL or a location in the document.

By default, links are not styled any different from normal text. However, you can easily apply a style of your choice with a show rule.

Example

#show link: underline

https://example.com \

#link("https://example.com") \
#link("https://example.com")[
  See example.com
]
Preview

Syntax

This function also has dedicated syntax: Text that starts with http:// or https:// is automatically turned into a link.

Parameters
Question mark

dest
str or label or location or dictionary
RequiredPositional
Question mark

The destination the link points to.

View example
= Introduction <intro>
#link("mailto:hello@typst.app") \
#link(<intro>)[Go to intro] \
#link((page: 1, x: 0pt, y: 0pt))[
  Go to top
]
Preview

body
content
RequiredPositional
Question mark

The content that should become a link.

If dest is an URL string, the parameter can be omitted. In this case, the URL will be shown as the link.