Marcus Andrey Study
Ler em português Library

Motion and Interaction · Step 4 · 6 min read

Navigation transitions

Moving between screens is the biggest motion in most products, and the one people see most. How to choose a transition from the relationship between two screens, why entering is slower than leaving, the real durations and curves, and a push-and-back sketched in CSS with no script.

A navigation transition answers one question: how is this screen related to the one I just left? Deeper, sideways, or on top. Get the answer right and people feel they know where they are without reading a breadcrumb. Get it wrong, or animate everything the same way, and the motion becomes a delay people sit through dozens of times a day.

What you'll be able to do after reading:

  • Pick a transition from the relationship between two screens
  • Use Material's four patterns and the platform's own conventions
  • Set durations and curves for entering and leaving, and say why they differ
  • Build a push and back transition in CSS, with a reduced-motion version

1. Push, back and a tab switch

Inbox

The new icons are in the file

Files

Open a message, go back, then switch tabs. Keyboard: Tab to the message, Space; Tab to the tabs, arrow keys.

Two kinds of navigation, two kinds of motion. Going deeper, the message pushes in from the right in 400 ms with a decelerating curve, and the list slides a little to the left, as if it were behind; going back takes 200 ms and accelerates away. Switching tabs moves sideways between equals, so it is only a 200 ms fade. With reduced motion, every change is a fade.Live CSS, no script. Durations and curves: Material's motion tokens (medium4 400 ms, short4 200 ms, emphasized decelerate and accelerate). Demo: Marcus Andrey, CC BY 4.0.

Open a message, go back, then switch tabs. Two different relationships, two different motions:

  • Opening a message is going deeper. The detail pushes in from the right, over the list, and the list slides 30% to the left as if it stepped back. Going back reverses it exactly.
  • Switching tabs is moving between equals. There's no "left of Files", so there's no slide: a 200 ms fade, nothing more.

2. Choose by relationship

PatternUse it when the two screens are…What movesExample
Container transformOne thing, seen small and then bigThe container of the card grows into the new screen; its contents cross-fadeA card in a list opens into its detail page
Shared axisSteps in an order, or parent and childBoth screens slide together along one axis: x, y or z (depth)Next and Back in onboarding (x); a stepper (y); parent to child (z)
Fade throughNot strongly relatedThe old screen fades out, then the new one fades inTapping another tab in the bottom bar
FadeNot screens: something entering or leaving within this oneThe element fades (and often scales a little) in placeA dialog, a menu, a snackbar
Material's four transition patterns, chosen by one question: how are the two screens related? A strong relationship gets a motion that shows it; no relationship gets a fade that doesn't invent one.Table: Marcus Andrey, CC BY 4.0, from Material Design 3, Transition patterns, and Material Components for Android, Motion.

Material's four transition patterns are a useful decision tool, because each one answers the relationship question (Material Design 3, Transition patterns). Its own examples: container transform for "a card into a details page", shared axis for "an onboarding flow", "a stepper" and "a parent-child navigation", fade through for "tapping destinations in a bottom navigation bar", and fade for "a dialog", "a menu" and "a snackbar" (Material Components for Android, Motion).

Notice that the fade is the default for anything without a strong relationship. A fade doesn't claim a direction, so it can't lie about the map.


3. Entering is slower than leaving

Look at the numbers in the figure: 400 ms to push in, 200 ms to go back.

  • Entering brings new content that people need to read. It decelerates: fast at first, then settling gently, so the eye can land on the new screen. The curve is Material's emphasized decelerate, cubic-bezier(0.05, 0.7, 0.1, 1), and 400 ms is its medium4 token.
  • Leaving takes away something people are done with. It accelerates out of the way: emphasized accelerate, cubic-bezier(0.3, 0, 0.8, 0.15), in 200 ms, the short4 token (Material Web, motion tokens).
  • Bigger movements take longer. Material's guidance is that duration should increase as the area or distance of an animation increases (Material Components for Android, Motion). A full-screen push is one of the biggest motions in an app, so it sits at the top of the range. A tab fade over the same area moves nothing, so 200 ms is plenty. The lessons on duration and Easing curves go deeper.

4. The code that runs

These are the rules from the figure, as they run:

.mo-b-scrn--list   { transition: transform 200ms cubic-bezier(0.05, 0.7, 0.1, 1); }   /* back: the list comes forward again, decelerating into place */
.mo-b-scrn--detail { z-index: 1; transform: translateX(100%); visibility: hidden; box-shadow: -8px 0 24px rgb(0 0 0 / .12); transition: transform 200ms cubic-bezier(0.3, 0, 0.8, 0.15), visibility 0s 200ms; }
.mo-b-nav:has(.mo-b-open:checked) .mo-b-scrn--detail { transform: none; visibility: visible; transition: transform 400ms cubic-bezier(0.05, 0.7, 0.1, 1), visibility 0s; }
.mo-b-nav:has(.mo-b-open:checked) .mo-b-scrn--list   { transform: translateX(-30%); transition: transform 400ms cubic-bezier(0.05, 0.7, 0.1, 1); }
@media (prefers-reduced-motion: reduce) {
  /* no sliding: the new screen fades in where it stands */
  .mo-b-scrn--detail { transform: none; opacity: 0; transition: opacity 200ms linear, visibility 0s 200ms; }
  .mo-b-nav:has(.mo-b-open:checked) .mo-b-scrn--detail { opacity: 1; transition: opacity 200ms linear, visibility 0s; }
  .mo-b-nav:has(.mo-b-open:checked) .mo-b-scrn--list { transform: none; }
}

Three details worth stealing:

  • Each state carries the transition into it. The rule for "open" holds the 400 ms entering curve; the default rule holds the 200 ms leaving curve. That's how CSS gives you different timing in each direction.
  • visibility waits. The detail stays visible for the 200 ms it takes to leave, then becomes hidden, so it can't be reached by Tab or a screen reader while it's off screen.
  • Only transform and opacity animate. Browsers can move those without recalculating the layout, which keeps a full-screen slide smooth (web.dev, How to create high-performance CSS animations; Motion performance).

In a real site the screens are separate pages, and the browser can animate between them with View Transitions (Web Animations and View Transitions). The decisions are the same: direction, duration, curve, and what happens with reduced motion.


5. Reduced motion: fade, don't slide

A screen that slides across the whole viewport is the kind of large movement that can make people with vestibular disorders dizzy or sick. WCAG 2.3.3 asks that motion triggered by interaction can be turned off unless it's essential (W3C, Understanding 2.3.3). A slide isn't essential; the change of screen is. So under prefers-reduced-motion: reduce the figure replaces every slide with a 200 ms fade (MDN, prefers-reduced-motion). The map is still there: the Back link, the title, the same place for everything.


6. Common mistakes

  • The same slide for every navigation, including tabs and dialogs.
  • Transitions over 500 ms on something people do all day.
  • Entering and leaving with the same curve and duration, so going back feels sluggish.
  • A transition that blocks input: people should be able to tap Back while it's still moving (Apple HIG, Motion: "Let people cancel motion").
  • Animating left or width instead of transform, and getting a stutter on cheaper phones.

7. Vocabulary

Term Meaning
Push A new screen slides in over the old one, going deeper
Pop (back) The reverse of a push
Shared axis Both screens move together along x, y or z
Fade through The old screen fades out, then the new one fades in
Decelerate (ease out) Fast start, gentle stop: for things that arrive
Accelerate (ease in) Gentle start, fast exit: for things that leave

8. Try it (no tools needed)

  1. In an app you use daily, do five navigations: open an item, go back, switch tabs, open a menu, open a dialog.
  2. For each, write its direction and guess its duration: short, medium or long.
  3. Which ones would you change to a simple fade?

Reflection questions: Does going back in your product feel faster than going in? Which transition would you remove first if you had to remove one?


9. If you already practise

  • Write a navigation motion table for your product: each relationship, its pattern, duration and curve in, duration and curve out, and its reduced-motion version.
  • Put those values in Motion tokens so every team ships the same push.
  • Test transitions on a cheap Android phone and with the system's reduced-motion setting on.

Checklist

Learn more

Books, courses and videos to go deeper

Book links go to Amazon. As an Amazon Associate I earn from qualifying purchases, at no extra cost to you.

The spatial model of an interface · Shared element transitions · Build a page transition · Easing curves · Navigation patterns

Saved only on this device.

↑ ↓ to move · Enter to open · Esc to close