Edit this page

API Status effects
module up.status

Unpoly can apply temporary status effects to your page as the user navigates through your site.

For example, you can show arbitrary loading state while waiting for the server, implement optimistic rendering or highlight current links in navigation bars.


Guides

Features

Essentials

All features

HTML
.up-active stable

While rendering, the .up-active class is added to the origin element that triggered the change.

HTML
[up-alias] stable

Links within navigational container may use the [up-alias] attribute to alternative URLs for which they should also be highlighted as .up-current.

HTML
.up-current stable

When a link within a navigational container points to the current location, it is assigned the .up-current class.

HTML
.up-loading stable

While rendering, all targeted fragments are assigned the .up-loading class.

HTML
[up-nav] stable

Marks this element as a navigational container, such as a menu or navigation bar.

HTML
[up-placeholder] experimental

Links or forms can define a placeholder that will be shown within the targeted fragment while loading content from the server.

HTML
[up-preview] stable

Links or forms can name a preview function that is called while loading content from the server.

JS
up.preview(name, callback) stable

Registers a named preview function.

JS
up.status.config stable

Sets default options for this package.