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

# `up.status`

Features to show which request is loading and which link leads to the current page.

While a request is loading, the origin element that triggered it gets an [`.up-active`](https://unpoly.com/api/up-active.md) class and the targeted fragments get [`.up-loading`](https://unpoly.com/api/up-loading.md). For richer loading state, a link or form can show an [`[up-placeholder]`](https://unpoly.com/api/up-placeholder.md) inside the fragment it targets, or name an [`[up-preview]`](https://unpoly.com/api/up-preview.md) function registered with [`up.preview()`](https://unpoly.com/api/up.preview.md). A preview can change the page in any way, up to rendering the expected result before the server confirms it. Every effect is reverted when the request ends.

Within an [`[up-nav]`](https://unpoly.com/api/up-nav.md) container, links pointing to the current location are marked [`.up-current`](https://unpoly.com/api/up-current.md), and the class moves as the user navigates.

<nav aria-label="Guides">

- [Learn: Loading state](https://unpoly.com/learn/loading-state.md)
- [Learn: Navigation bars](https://unpoly.com/learn/navigation-bars.md)

</nav>

---

## Features {#features}

- ### [.up-active](https://unpoly.com/api/up-active.md) (CSS class)

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

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

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

- ### [.up-current](https://unpoly.com/api/up-current.md) (CSS class)

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

- ### [.up-loading](https://unpoly.com/api/up-loading.md) (CSS class)

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

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

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

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

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

- ### [up.preview(name, callback)](https://unpoly.com/api/up.preview.md) (JavaScript function)

  Registers a named preview function.

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

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

- ### [.up-revalidating](https://unpoly.com/api/up-revalidating.md) (CSS class) (experimental)

  While revalidating content rendered from a stale cache entry, all targeted fragments are assigned the `.up-revalidating` class.

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

  Sets default options for status effects.

