up.motion
JavaScript namespace
Features to animate fragment updates.
A transition morphs an old element into its new version. Set an [up-transition] attribute on a link or form, or pass a { transition } option to up.render(). An animation shows or hides a single element without a counterpart, for example when an overlay opens with an [up-animation] attribute, or when up.destroy() removes a fragment.
Unpoly ships with predefined transitions and predefined animations. Define your own with up.transition() and up.animation(). To play an effect outside a render pass, call up.animate() or up.morph() directly.
Features
-
Applies the given animation to the given element.
-
Defines a named animation.
-
Performs an animated transition between two elements.
-
up.motion.config CONFIG
Sets default options for animations and transitions.
-
Completes animations and transitions.
-
up:motion:finish EVENT
This event is emitted on an animating element by
up.motion.finish()to request the animation to instantly finish and skip to the last frame. -
Returns whether Unpoly will perform animations and transitions.
-
Defines a named transition that morphs from one element to another.
-
[up-transition] ATTR
Swaps a fragment with an animated transition.