Smooth view transitions for dialogs

Graphic titled “Dialog view transitions”, showing four cat photos with expand icons, a code snippet about startViewTransition, and the author’s portrait in the corner.

Thomas Günther explores how to combine two modern web APIs, the <dialog> element and View Transition API, to create smooth animations when opening and closing dialogs. The technique uses document.startViewTransition(), showModal(), and close() calls, with a shared view-transition-name to link elements. This progressive enhancement ensures accessibility and works across major browsers, apart from closedby missing from Safari.

medienbaecker.com/articles/dialog-view-transitions