Does Liveview support view-transitions?

Just read about this in HTMX’s blog post:

</> htmx ~ Examples ~ View Transitions

It’s called “view transitions” and it’s coming into the standard. Anyone play with this even outside of Liveview perhaps? What are your thoughts?


It might be possible to do that by hooking into the livecycle events of LV similar to this one: Phoenix LiveView browser loading spinner / · GitHub

Chris mentioned that liveview itself won’t include anything not yet standard though.


I started playing with view transitions after reading this post and decided to test it on LiveView. This chunk of code was enough to get it working.

The technique is not a standard yet, but it has a good usage %. Also, it’s a nice progressive enhancement, since it updates the DOM “the normal way” if the browser doesn’t support it.

Perhaps it could be a nice addition to LiveView, as it is very simple and allows developers to easily add complex animations when content changes.