A plain view transition (see the View Transition entry) doesn't distinguish why it fired — it always plays the same cross-fade/morph. A carousel or step wizard where "next" should slide left and "back" should slide right needs a different animation per transition, and the old workaround was toggling a class on the body right before the transition.
Passing a types array, like `document.startViewTransition({ update, types: ["forward"] })`, gives the in-flight transition a CSS state named `:active-view-transition-type(forward)`. Targeting it with `::view-transition-group(*):active-view-transition-type(forward)` lets you assign different keyframes just for that state — directional transitions expressed through the standard API.
Check caniuse/MDN baseline for support. Where it's missing (or `startViewTransition` itself is absent), toggling a direction class on the container right before the transition and faking the slide with CSS transitions/keyframes is the fallback.
When to use
Carousels or step wizards where the transition animation needs to differ based on which direction you moved.