Arwes LogotypeArwes Logotext

Nesting Animators

Animator components can be nested to create variations of animation flow transitions. By default, a child node will listen to its parent node for flow changes to transition itself.

A child node will enter the animation flow when its parent flow is entered. It will exit the animation flow when its parent flow is exiting.

By default, all direct children nodes of a parent node will enter the animation flow in parallel. This behaviour can be changed by defining an animator manager.

An animated <Menu/> and <Item/> components could be nested like:

tsx
<Menu>
<Item>Menu Item 1</Item>
<Item>Menu Item 2</Item>
<Item>Menu Item 3</Item>
</Menu>

All the item nodes will transition to entering at once when the menu node is on flow entered, unless configured otherwise.

A complete example could look like this:

  • Menu Item 1
  • Menu Item 2
  • Menu Item 3
JSX

The menu component animations run first. When they are completed, the menu items run.

Since the menu component is not configured to have a manager, its children items are transitioned in parallel. This can be configured. See animator managers.