Transitions

Transitions are used to add basic motion to components.

Collapse

Expand vertically from the top of the child element. The collapsedHeight property can be used to set the minimum height when not expanded.

Fade

Fade in from transparent to opaque.

Grow

Expand outwards from the center of the child element, while also fading in from transparent to opaque.

The second example demonstrates how to change the transform-origin, and conditionally applies the timeout property to change the entry speed.

Slide

Slide in from the edge of the screen. The direction property controls which edge of the screen the transition starts from.

The Transition component's mountOnEnter property prevents the child component from being mounted until in is true. This prevents the relatively positioned component from scrolling into view from it's off-screen position. Similarly the unmountOnExit property removes the component from the DOM after it has been transitioned off screen.

Zoom

Expand outwards from the center of the child element.

This example also demonstrates how to delay the enter transition.

SSR

To better support server rendering, Unifi provides a style property to the children of some transition components (Fade, Grow, Zoom, Slide). The style property must be applied to the DOM for the animation to work as expected.

Properties