Rik Schennink animates <dialog> with the View Transitions API as a progressive enhancement, behind a check for prefers-reduced-motion and startViewTransition support. The trick: set view-transition-name on the button and its label, intercept the Invoker Commands API command and cancel events, then move those names onto the dialog and its title inside startViewTransition() to morph button into modal.
pqina.nl/blog/animating-the-dialog-element-using-view-transitions
