These four concepts are easy to confuse in conversation: scroll-driven animations, scroll-triggered animations, container query scroll states, and view transitions. The distinctions are worth spelling out because each one solves a different problem.

Animation tied to scroll progress

A scroll-driven animation has a direct, one-to-one link between scrolling progress and animation progress. Scroll forwards and the animation advances; scroll backwards and it runs backwards; stop scrolling and the animation stops with you.

.element {
  animation: grow-progress linear forwards;
  animation-timeline: scroll();
}

Animation fired by a threshold crossing

A scroll-triggered animation is not connected to scroll progress at all — it executes on scroll and then runs in its entirety. The animation starts when an element crosses a defined threshold, the trigger activation range, such as entering and exiting the scrollport, and continues to completion from there.

Scroll state as a query condition

Container query scroll state is defined in the working draft of the CSS Conditional Rules Module Level 5 specification, where it is described as allowing a container to be queried for state that depends on scroll position. In practice it resembles both of the above without being either: styles update when a container reaches some scroll condition.

.sticky-nav {
  container-type: scroll-state;
  position: sticky;
  top: 0;

  @container scroll-state(stuck: top) {
    background: orangered;
    border-radius: 0;
    flex-direction: row;
    width: 100%;

    a {
      text-decoration: none;
    }
  }
}

Transitions between views

View transitions have nothing to do with scrolling, nor with view(). The term covers an entire API of interlocking CSS and JavaScript features, with two modes.

Within a document

An element changes from one state to another in response to user interaction, on the page where it started — animating a radio button's check state as it moves from one input to another, for example.

Across documents

Here the animation spans one page and the next. The default is a crossfade from Page A to Page B and back, which is simple to implement, though it can become far more elaborate — a circular clip-path wiping away the first page to reveal the second, for instance.

TypeWhat it does
Scroll-Driven AnimationsScroll forwards, the animation moves forward. Scroll backwards, the animation runs backwards. Stop scrolling, the animations stops.
Scroll-Triggered AnimationsWhen an element crosses some defined threshold — called the trigger activation range — the animation runs, runs, runs.
Container Query Scroll StateUpdates styles when a container reaches some sort of scroll condition.
View TransitionAPI for same-document transitions (element changes from one state to another on the page) and cross-document transitions (transitioning from one page to the next, and back).