---
name: "up.link"
area: "API"
kind: "module"
parent: "API reference"
url: "https://unpoly.com/api/up.link"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [API reference](https://unpoly.com/api.md)</nav>

# `up.link`

Features to follow links without a full page load.

Set an [`[up-follow]`](https://unpoly.com/api/up-follow.md) attribute to let Unpoly handle a link, and an [`[up-target]`](https://unpoly.com/api/up-follow.md#up-target) attribute to choose the fragment it updates. The same behavior is available from JavaScript through [`up.follow()`](https://unpoly.com/api/up.follow.md), and [`up:link:follow`](https://unpoly.com/api/up:link:follow.md) lets your code observe or prevent any link Unpoly follows.

Links feel faster with [`[up-instant]`](https://unpoly.com/api/up-instant.md), which follows on `mousedown` instead of `click`, and [`[up-preload]`](https://unpoly.com/api/up-preload.md), which fetches the response before the user clicks. An [`[up-defer]`](https://unpoly.com/api/up-defer.md) placeholder loads its content from another URL after the page has rendered, or when it is scrolled into view.

<nav aria-label="Guides">

- [Learn: Links](https://unpoly.com/learn/links.md)

</nav>

---

## Features {#features}

- ### [up:click](https://unpoly.com/api/up:click.md) (DOM event)

  A `click` event that honors the `[up-instant]` attribute.

- ### [[up-clickable]](https://unpoly.com/api/up-clickable.md) (HTML attribute) (experimental)

  Enables keyboard interaction and other accessibility behaviors for non-interactive elements that represent clickable buttons.

- ### [[up-dash]](https://unpoly.com/api/up-dash.md) (HTML attribute) (deprecated)

  Follows this link as fast as possible.

- ### [[up-defer]](https://unpoly.com/api/up-defer.md) (HTML attribute)

  A placeholder for content to be loaded later from another URL.

- ### [up.deferred.load(placeholder, [options])](https://unpoly.com/api/up.deferred.load.md) (JavaScript function)

  Loads a `[up-defer="manual"]` placeholder.

- ### [up:deferred:load](https://unpoly.com/api/up:deferred:load.md) (DOM event)

  This event is emitted before an `[up-defer]` placeholder loads its deferred content.

- ### [[up-expand]](https://unpoly.com/api/up-expand.md) (HTML attribute)

  Enlarges the click area of a descendant link. A click anywhere in the area does what a click on its link does.

- ### [up.follow(link, [options])](https://unpoly.com/api/up.follow.md) (JavaScript function)

  Follows the given link with JavaScript and updates a fragment with the server response.

- ### [[up-follow]](https://unpoly.com/api/up-follow.md) (HTML attribute)

  Follows this link with JavaScript and updates a fragment with the server response.

- ### [[up-href]](https://unpoly.com/api/up-href.md) (HTML attribute) (deprecated)

  Makes any element behave like a hyperlink.

- ### [[up-instant]](https://unpoly.com/api/up-instant.md) (HTML attribute)

  Activates this link-like element on `mousedown` instead of `click` ("Act on press").

- ### [up.link.config](https://unpoly.com/api/up.link.config.md) (Configuration object)

  Configures defaults for link handling.

- ### [up:link:follow](https://unpoly.com/api/up:link:follow.md) (DOM event)

  This event is emitted when a link is followed through Unpoly.

- ### [up.link.followOptions(link)](https://unpoly.com/api/up.link.followOptions.md) (JavaScript function)

  Parses the render options that would be used to follow the given link, but does not render.

- ### [up.link.isFollowable(link)](https://unpoly.com/api/up.link.isFollowable.md) (JavaScript function)

  Returns whether the given link will be followed by Unpoly instead of making a full page load.

- ### [up.link.isSafe(link)](https://unpoly.com/api/up.link.isSafe.md) (JavaScript function)

  Returns whether the given link has a safe HTTP method like `GET`.

- ### [up.link.makeFollowable(link)](https://unpoly.com/api/up.link.makeFollowable.md) (JavaScript function) (experimental)

  Makes sure that the given link will be followed by Unpoly instead of making a full page load.

- ### [up.link.preload(link, [options])](https://unpoly.com/api/up.link.preload.md) (JavaScript function)

  Preloads a `GET` link.

- ### [up:link:preload](https://unpoly.com/api/up:link:preload.md) (DOM event)

  This event is emitted before a link is preloaded.

- ### [[up-preload]](https://unpoly.com/api/up-preload.md) (HTML attribute)

  Preloads this link before the user clicks it. When the link is clicked, the response will already be cached, making the interaction feel instant.

