Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anybody have any thoughts on if the View Transition API is going to replace a lot of HTMX usage?

This multi-page demo is decent, where each click is actually loading a new page: https://view-transitions.chrome.dev/stack-navigator/mpa-prer...

https://developer.chrome.com/docs/web-platform/view-transiti...

> The View Transition API gives you the power to create seamless visual transitions between different views on your website. This creates a more visually engaging user experience for users as they navigate your site, regardless of whether it's built as a multi-page application (MPA) or a single-page application (SPA). Typical situations where you would use view transitions include:

> A thumbnail image on a product listing page that transitions into a full-size product image on the product detail page.

> A fixed navigation bar that stays in place as you navigate from one page to another.

> A grid with items moving positions as you filter through.

So this would cover a few uses of HTMX?

Recent Safari and Chrome now have decent support. Sounds like Firefox are working on it but I couldn't find an expected release date.



i think the transition API, when it is broadly available for MPAs, could replace a fair number of simple UI use cases of htmx. The main feature it would likely obsolete is the `hx-boost` feature:

https://htmx.org/attributes/hx-boost/

There are already people, including people on the core htmx team, who think that hx-boost isn't a great feature:

https://htmx.org/quirks/#some-people-don-t-like-hx-boost

If that goes away, htmx will be useful for smaller transclusional features at a lower level of complexity, so the two should complement one another in my opinion.


> If that goes away, htmx will be useful for smaller transclusional features at a lower level of complexity

Thanks! Any examples here to help understand where View Transition doesn't help?


I think active search (submitting requests as you type) is an example of something that View Transitions don't help with:

https://htmx.org/examples/active-search




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: