Skip to content
HomeNewsConceptsGuidesToolbox
AboutSubscribeUA
Subscribe

AI Today Brief

The daily AI-engineering brief. Built in public. EN · UA.

XTelegramLinkedInYouTubeRSS

Follow AI Today Brief on LinkedIn for daily AI-engineering updates and the weekly “5 shifts that changed how developers work” PDF.

Explore

NewsDigestsConceptsGuides

Company

SubscribeAdvertiseAbout

Legal

Editorial policyAI disclosurePrivacyTerms

© 2026 AI Today Brief. All rights reserved.

  1. Home/
  2. News/
  3. Tools & releases/
  4. htmx 4.0.0 Arrives with Fetch API Internals, Idiomorph Integration, and Partial Swaps
Tools & releases

htmx 4.0.0 Arrives with Fetch API Internals, Idiomorph Integration, and Partial Swaps

htmx 4.0.0 shifts core request handling from XMLHttpRequest to the Fetch API and introduces explicit attribute inheritance. It also bakes in morphing DOM swaps and the new hx-partial element for granular out-of-band updates.

August 29, 2026· 4 min read
OKCurated by Oleksandr Kuzmenko, AI Product Engineer·Updated August 29, 2026·Sources cited on every story
AI-assisted · editor-reviewed·How we use AI
htmx 4.0.0 Arrives with Fetch API Internals, Idiomorph Integration, and Partial Swaps

Impact: High

Why it matters

You can upgrade web apps to faster fetch-based DOM swapping while auditing attribute inheritance using the official CLI tool.

TL;DR

  • 01htmx 4.0.0 migrates internal HTTP calls from XHR to fetch().
  • 02Attribute inheritance now requires explicit :inherited modifiers.
  • 03Run npx htmx.org@4.0.0 upgrade-check to scan templates for breaking changes.

Key facts

4.0.0Release Version
8 monthsDevelopment Time
Release Version
4.0.0
Development Time
8 months
NPM Default Tag
2.x remains latest; 4.0.0 is next until 2027
HTTP Transport Engine
fetch() API (replaced XMLHttpRequest)

Fetch Core and Explicit Inheritance

htmx 4.0.0 replaces XMLHttpRequest with fetch(). The most significant breaking change is that attributes no longer cascade to child elements by default. To preserve parent-child inheritance, append :inherited to the attribute name, such as hx-confirm:inherited="Are you sure?".

Improved History and Native Morphing

History restoration now avoids localStorage DOM snapshots, which previously corrupted state when used alongside third-party JavaScript libraries. On back navigation, htmx re-fetches the page and swaps it into <body> or [hx-history-elt]. Morphing DOM swaps are now built-in using an improved idiomorph algorithm, and the <hx-partial> tag enables targetable out-of-band updates.

Migration CLI Tool

To assist with upgrading, the team provides an automated checker to locate implicit attribute inheritance and legacy event names: npx htmx.org@4.0.0 upgrade-check -- ./templates

Try it in 2 minutes

npx htmx.org@4.0.0 upgrade-check -- ./templates

bash

✓ When to use

  • Building hypermedia-driven web applications with modern backend frameworks
  • Upgrading existing htmx 2.x apps using automated CLI audit tools
  • Needing out-of-the-box DOM morphing and granular OOB updates

✕ When NOT to use

  • Single Page Applications requiring complex client-side state management
  • Projects unable to modify existing templates to fix attribute inheritance

What to do today

  • →Run npx htmx.org@4.0.0 upgrade-check on project template folders.
  • →Append :inherited to hx-confirm, hx-target, or hx-headers used on parent elements.
  • →Replace legacy htmx:xhr events with fetch-compatible event handlers.
#htmx#Alpine.js

Sources

  • htmx 4.0.0 is released
ShareShare on XShare on LinkedIn
← Previous storyHugging Face Open ASR Leaderboard Adds Monsoon Dataset for Indic Speech EvaluationNext story →Autonomous AI Agents Leverage Public Pull Requests to Weaponize Exploits Within Minutes

Related stories

  • Tools & releasesOpen-Source Gateway Experiential Routes Agent Workflows via Trace Optimization
  • Tools & releasesGoogle Releases Gemini 3.5 Transcribe for Voice Agents and Hands-Free Vibe Coding
  • Tools & releasesOpenAI Restores 5-Hour Rate Limits for ChatGPT Plus Developer Subscriptions
  • Tools & releasesAnthropic Launches Community Plugin Marketplace for Claude Code

Email digest

Get the morning AI brief

One email a day — the stories that matter for engineers, founders and tech leads. Human-edited, with links to primary sources.

  • ✓120+ sources scanned daily
  • ✓Edited by a human
  • ✓1 email per day
  • ✓EN + UA

By subscribing you agree to the privacy policy.