htmx 4.0 is announced with major internal changes while maintaining familiar API. The library transitions from XMLHttpRequest to fetch(), introduces explicit attribute inheritance via :inherited modifier, simplifies history support by removing DOM snapshots, and adds streaming responses with idiomorph integration. New features include partial elements for better out-of-band swaps, improved view transitions with queuing, and enhanced hx-on scripting support. Expected alpha release in Q2 2025 with stable release in early 2027.
Table of contents
htmx 4: The fetch()eningProject GoalsWhat Stays The Same?UpgradingNew FeaturesTimelineSort: