API reference up.link
module

Features to follow links without a full page load.

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

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


Features

  • up:click EVENT

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

  • [up-clickable] ATTR experimental

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

  • [up-dash] ATTR deprecated

    Follows this link as fast as possible.

  • [up-defer] ATTR

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

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

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

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

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

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

  • [up-href] ATTR deprecated

    Makes any element behave like a hyperlink.

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

  • Configures defaults for link handling.

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

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

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

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

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

  • Preloads a GET link.

  • This event is emitted before a link is preloaded.

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