Instances of up.Preview
can describe temporary changes to a page.
You can use this to describe arbitrary loading state or implement optimistic rendering.
Previews are usually defined using up.preview()
(lowercase)
and then applied using the [up-preview]
attribute or { preview }
option.
See Previews for an overview.
Temporarily adds a CSS class to an element.
Temporarily disables fields and buttons.
Whether this preview has ended.
When revalidating a cache entry, this property is the cached response with expired content.
The targeted Element
that is being previewed.
Temporarily hides an element.
Temporarily hides the children of an element.
Temporarily inserts an element.
The layer that the previewed render pass is going to update.
Opens a temporary overlay.
The origin element that triggered this render pass.
Form data for the request being previewed.
Temporarily removes a CSS class from an element.
The render options for this render pass.
The request that is loading.
Whether the previewed render pass is a revalidation an expired cache entry.
Runs another preview function.
Temporarily changes an element's attributes.
Temporarily sets inline CSS styles on an element.
Temporarily shows a hidden element.
Shows a temporary placeholder within an element.
Visually replaces the children of an element with new content for the duration of this preview.
Register a function that will revert this preview's effects when the preview ends.