Your search - - did not match any documents.
Suggestions:
Rachel Nabors is the cultivator of the Web Animation community, author of Animation at Work, a Google Developer Expert, invited expert at the W3C, and has helped clients build motion design into their user interfaces.
She believes that animation is a necessary part of a complete and balanced user experience because it helps convey information visually that could otherwise bog down the human brain.
After summarizing CSS transitions, Rachel introduces how Vue handles transitions, with its transition
element, which allows the adding of entering and leaving transitions to any element or component.
When you assign a name to a transition
element, it creates these name-spaced CSS classes:
enter
enter-to
enter-active
leave
leave-to
leave-active
She explains how there is a separate lifecycle for when the element enters the page and when it leaves the page. Each lifecycle has an initial state (enter
/ leave
) and an ending state (enter to
/ leave to
). The actual transition is added with enter-active
and leave-active
.
However, she recommends not using enter-to
or leave
and instead putting the default state in the original CSS class. This way, if animation is not supported, the default state will still be shown.
Next, Rachel introduces the transition-group
element, which can wrap multiple elements and gives an additional class called move
, which is used with the FLIP animation technique. Her recommendation here is to set a unique key when using multiple elements within a transition group.
She goes on to discuss transition modes, which determine the order of animations, and how you can use in-out
and out-in
to design how these elements enter and leave in relation to each other.
As her talk progresses, Rachel discusses JavaScript animation hooks using the Web Animation API. The transition
element has a set of JavaScript hooks such as leave
, enter
, etc., and Rachel demonstrates how you can use them to trigger a function with Vue’s v-on
directive, and she shows how you can use the Web Animation API’s animate
method.
Pro Tip: she says to make sure to set v-bind:css="false"
when animating with JavaScript to avoid conflicts and performance issues. This means you have to tell Vue when the animation has ended, which she shows how to do.
UI animation can cause negative side effects for some users, such as:
In her talk, Rachel walks through how to adjust animation code to make it accessible.