Menu

1 / 5

View Transitions: animate any DOM change with one call

DEV Community: css·richi.codes·about 9 hours ago
#mDZYSh7a
#devtocss#devto#dev#transition#view
Reading 0:00
15s threshold

This note has an interactive demo. Try it in the original

You change the DOM however you like, wrap that change in document.startViewTransition() , and the browser animates from the old state to the new one. No FLIP math, no animation library, no keeping two copies of the UI alive. Same-document view transitions have been Baseline since October 14, 2025, and the parts that make them scale ( view-transition-class and transition types) joined them by January 2026.

The demo above is a bento grid where nothing is animated by hand. The grid simply gets reordered, filtered or switched to a list, and a card turns into a full panel. Turn on Slow motion to watch it, or untick View Transitions to see the same DOM changes without it.

What it is and why it matters

Animating a layout change used to mean measuring every element before and after, then faking the motion with transforms. The View Transition API flips that around.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.