TypstDocumentation

linkShowable
Question mark

Link to a URL or another location in the document.

The link function makes its positional body argument clickable and links it to the destination specified by the dest argument. 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
stringdictionaryRequiredPositional
Question mark

The destination the link points to.

#link("mailto:hello@typst.app") \
#link((page: 1, x: 0pt, y: 0pt))[
  Go to top
]
Preview

body
contentPositional
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.