Whenever you update a page fragment you can animate the change.
Let's say you are using an
up-target link to update an element
with content from the server. You can add an attribute
to smoothly fade out the old element while fading in the new element:
<a href="/users" up-target=".list" up-transition="cross-fade">Show users</a>
When we morph between an old and a new element, we call it a transition. In contrast, when we animate a new element without simultaneously removing an old element, we call it an animation.
An example for an animation is opening a new dialog. We can animate the appearance
of the dialog by adding an
up-animation attribute to the opening link:
<a href="/users" up-modal=".list" up-animation="move-from-top">Show users</a>
Applies the given animation to the given element.
Defines a named animation.
Performs an animated transition between two elements. Transitions are implement by performing two animations in parallel, causing one element to disappear and the other to appear.
Returns whether Unpoly will perform animations.
Returns a no-op animation or transition which has no visual effects and completes instantly.
Returns a new deferred that resolves once all given deferreds have resolved.
Defines a named transition.
Sets default options for animations and transitions.