</> htmx
🚧 htmx 4.0 is under construction. Read changes →

Changes in htmx 4.0

htmx 4.0 is a ground up rewrite of the implementation of htmx, using the fetch() API. This document outlines the major changes between htmx 2.x and htmx 4.x.

Major Changes

fetch() API replaces XMLHttpRequest

Explicit Attribute Inheritance

Event Naming Convention Changed

History Storage

Non-200 Swapping Defaults

New Features

Morphing Swap

Built-in Streaming Response Support

View Transitions

Scripting API

Unified Request Context

Modern Swap Terminology

Inheritance Attribute Modifiers

HTTP Status Code Conditional Swapping

Partial Tags

Attribute Changes

Renamed Attributes

Removed Attributes

New Attributes

Attribute Modifier Syntax

Event Changes

Event Name Mappings

New Events

Extensions Are Now Globally Registered