Faragiri
English

Choose a language 2

Learn Transitions Motion

A Dresden marketplace whose cross fade left people asking whether the app had opened the wrong listing, and a FLIP that ran at 22 frames on an old phone.

6Sections
4Min read
4Depth

Recommended Before This

0 / 1

A transition's job is continuity, so name the shared element first. Not the duration, not the curve: which object exists on both sides of the change, because that object is the whole message and everything else is timing.

Jonas is adding motion to a second hand instrument marketplace in Dresden. Tapping a listing in the grid opens its page, and the previous version faded one screen out and the next one in.

The shared element

The photograph persists from the grid into the detail page. It is the only thing on both screens, it is what the person tapped, and moving it from where it was to where it is going is the sentence the animation is saying.

Sixty listings, one tap

Only the shared photograph travels across the screen change

Naming which single object persists from grid to detail turns a blind cross-fade into clear spatial continuity.

The gridsixty thumbnails, one of them tapped
  1. 01Photograph movesthe sole element present on both screens travels between boxes
  2. 02Title and price fadedestination details appear in place rather than flying in
  3. 03Seller and notes fadenew context enters quietly around the anchored image
  4. 04Origin stays clearremoving the move would leave buyers unsure which card opened
The detail pagesame instrument photograph at larger scale

Everything else exists on only one side of the navigation; the photograph is the whole continuity story.

Modular Type Scale & CSS Flex/Grid Motion Lab

Test harmonic typography ratios and live Flexbox/Grid layouts with 1-click CSS export.

Everything else on both screens can fade. The heading, the price, the seller's name and the description exist on one side only, and they arrive rather than travel.

The check afterwards is the cluster's: removing the animation should leave the person confused about where it came from, and here it does. On this transition, removing it leaves somebody looking at a detail page with no idea whether it is the listing they touched, which is the failure the previous version had.

The technique, and the two properties

FLIP: measure first, measure last, invert, then play. Measure the photograph's rectangle in the grid, let the browser lay out the detail page, measure it again, then transform the element back to where it was and remove the transform over the duration.

FLIP and GPU properties

Four steps move the image without triggering layout on every frame

Measuring before and after lets you animate transform and opacity alone, avoiding the layout recalculation that stalls older phones.

  1. 01Measure firstrecord the photograph rectangle inside the listing grid
  2. 02Measure lastrender the detail layout and read the destination rectangle
  3. 03Invertapply a transform placing the final image back over the grid spot
  4. 04Play transform and opacityanimate the transform away without touching width or height

Animating width and height recalculated layout on every frame and dropped a three-year-old phone to 22 frames a second.

The reason for that shape is the constraint underneath it: animate transform and opacity only. Those two are handled without touching layout, and everything else on the list of tempting properties is not.

Animating width and height recalculates layout and drops frames, on every frame, for the whole duration. The naive version ran at 22 frames a second on a three year old phone, which is a slideshow, and it looked perfect on the machine it was written on.

In and out are different

240 ms in and 120 ms out. Leaving is faster than entering, because nobody waits to see a thing go: the person has already decided, they are looking at where they are going, and a slow exit is time spent watching something they have finished with.

Asymmetric durations

Entering earns 240 ms to orient, while leaving finishes in 120 ms

Opening carries information about which thumbnail was tapped; closing happens after the user has already decided to move on.

transition duration (ms)

  1. Entering detail pagegives the eye time to track the image from grid to header240 ms
  2. Leaving back to gridquick exit because nobody waits to watch old context leave120 ms

At 120 ms an entry transition shrinks into a flicker instead of communicating spatial origin.

Entering earns its time because it is carrying information. The photograph travelling from a grid position to a page position is telling somebody which of sixty thumbnails they are now looking at, and at 120 ms that is a flicker rather than a movement.

What to open

The View Transitions API does the FLIP for you, part of the language, in Chrome since 2023, and not yet in every browser, which is the honest state of it. Where it is available it handles the measuring and the inverting across a whole navigation, including between documents, and it replaces hand written code that has to know both layouts and be updated whenever either changes.

What to open

Use View Transitions where supported, and verify under CPU throttling

Platform APIs automate the rectangle math, while the DevTools frame meter tests real smoothness under a quarter-speed processor.

Are you wiring the transition or checking its frame rate?
  • Wiring the transition
    View Transitions APIin Chrome since 2023, not yet universal
    • Handles FLIP measurement across view and document changes
    • Replaces brittle manual layout tracking code
  • Checking real performance
    Frame rate meter + 4x throttlebuilt free into browser developer tools
    • Throttle processor to a quarter before testing
    • Confirm frame rate holds near sixty instead of trusting fast hardware

Watching an animation on a fast development laptop hides frame drops that show up immediately on throttled hardware.

The browser's frame rate meter is the check, free and already in the developer tools, and it replaces watching an animation on a development machine and deciding it is smooth. Turn it on, throttle the processor to a quarter, and run the transition: the number either stays near sixty or it does not, and no amount of looking tells you which.

Where it stalls: scheduled last

Motion is scheduled as the last task, so it is judged as decoration and built on whatever the layout turned out to be. The screens are designed, the build is done, and somebody adds transitions in the final week.

Where it stalls

Scheduling motion last breaks continuity when aspect ratios diverge

If a thumbnail is cropped square and the detail photo is sixteen by nine, the shared element was made unshareable months earlier.

Checking whether an element appears on both screens in the same shape takes one minute during layout design.

By then the shared element may not be shareable. If the grid's photograph is cropped square and the detail page's is sixteen by nine, there is no single element that exists in both, and the only available animation is a fade. The decision that made the transition impossible was a cropping decision made four months earlier by somebody who was not thinking about motion.

Asking one question at the layout stage prevents most of it: what is on both of these screens, and is it the same shape. It costs a minute and it is the whole of what motion needs from a layout.

What it looks like when it goes wrong

The marketplace's grid to detail change was a cross fade, 200 ms, correct in every respect the motion guidance covers. The support inbox carried a steady trickle of messages asking whether the app had opened the wrong listing, mostly from people browsing sixty similar looking violin cases. Nothing was wrong with the navigation. Two screens had replaced each other with nothing travelling between them, so there was no evidence that the second one came from the first, and the person had to check the title to be sure.

When timing is right but continuity fails

A tidy 200 ms cross-fade left buyers unsure which violin case opened

Replacing screens cleanly without moving a shared object broke user confidence across sixty visually similar instrument listings.

  • 200 ms cross-fadeclean navigation timing with zero layout jank
What passed the motion checklist
  • Nothing moved across screensno visual thread linked the tapped card to the opened page
  • Sixty similar violin casesbuyers could not confirm the right item opened by sight alone
  • Steady support inbox queriespeople repeatedly checked titles and asked if the app misfired

Continuity comes from carrying a recognizable object across the threshold, not from hitting a tidy millisecond count.

The 240 ms and the 120 ms are two points inside a duration band with rules of its own, which is curves and durations that feel physical. The small movements that confirm a tap rather than explain a change are feedback on the small actions. And a dialogue arriving over a page is a transition with an interruption attached, which is when to interrupt, and when not to. What all interface motion is for is one level up, in movement that explains rather than decorates.

Alongside this

Above this