Direction-aware transition

Also called directional transition or directional navigation

A transition that slides new content in from the side you are heading toward, so going forward and going back move in opposite directions.

What is Direction-aware transition?

In a direction-aware transition, the animation depends on where you are going. Tap Next and the current step slides out to the left while the next one enters from the right. Tap Back and everything reverses. The motion matches the map people already have in their heads, with earlier steps on the left and later ones on the right.

Use it for steppers, onboarding flows, carousels, image galleries, tabs, and calendars that page through months. When every change slides the same way, going back feels like moving forward again, and people lose their sense of place.

To build it, compare the new index with the previous one to get a direction of 1 or -1, then use that value in both the entering and the exiting animation. In Motion, pass it to the custom prop of AnimatePresence too, because an element that is leaving can no longer receive new props. In right-to-left languages, flip the direction.

Often confused with

Slide in
A slide-in always enters from the same side. A direction-aware transition picks the side based on whether you move forward or back.
All terms

Stepper

A multi-step flow with a row of numbered steps, like Account, Profile, Done, that shows where you are and how many steps are left.

Carousel

A row of slides shown one at a time and moved with arrows, dots, swipes, or a timer, to fit several images or cards in one spot.

Page transition

An animation that plays when you move from one page or screen to another, such as the old page fading out as the new one fades in.

Spatial consistency

Moving elements in ways that match where things live in the interface, so people can tell where an item went and how to find it again.