+++ insert_anchor_links = "heading" +++
high power tools for HTML
NEWS: htmx 2.0 has been released! It is not currently marked as latest in NPM so that people using the 1.x line are not accidentally upgraded. We will mark 2.0 as latest at some point in 2025.

introduction

htmx gives you access to [AJAX](@/docs.md#ajax), [CSS Transitions](@/docs.md#css_transitions), [WebSockets](@/docs.md#websockets-and-sse) and [Server Sent Events](@/docs.md#websockets-and-sse) directly in HTML, using [attributes](@/reference.md#attributes), so you can build [modern user interfaces](@/examples/_index.md) with the [simplicity](https://en.wikipedia.org/wiki/HATEOAS) and [power](https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) of hypertext htmx is small ([~14k min.gz'd](https://unpkg.com/htmx.org/dist/)), [dependency-free](https://github.com/bigskysoftware/htmx/blob/master/package.json), [extendable](https://htmx.org/extensions) & has **reduced** code base sizes by [67% when compared with react](@/essays/a-real-world-react-to-htmx-port.md)

motivation

* Why should only [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) & [`
`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) be able to make HTTP requests? * Why should only [`click`](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event) & [`submit`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event) events trigger them? * Why should only [`GET`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) & [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) methods be [available](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods)? * Why should you only be able to replace the **entire** screen? By removing these constraints, htmx completes HTML as a [hypertext](https://en.wikipedia.org/wiki/Hypertext)

quick start

```html ``` The [`hx-post`](@/attributes/hx-post.md) and [`hx-swap`](@/attributes/hx-swap.md) attributes on this button tell htmx: > "When a user clicks on this button, issue an AJAX request to /clicked, and replace the entire button with the HTML response" htmx is the successor to [intercooler.js](http://intercoolerjs.org) Read the [docs introduction](@/docs.md#introduction) for a more in-depth... introduction. Note that htmx 2.x has dropped IE support. If you require IE support you can use the [1.x](https://v1.htmx.org) code-line, which will be supported in perpetuity.

book

We are happy to announce the release of [Hypermedia Systems](https://hypermedia.systems), a book on how to build [Hypermedia-Driven Applications](@/essays/hypermedia-driven-applications.md) using htmx & more:
hypermedia systems

sponsors

htmx development can be supported via [GitHub Sponsors](https://github.com/sponsors/bigskysoftware?o=esb) Thank you to all our generous supporters, including:

Platinum Sponsor

## Gold Sponsors ## Silver Sponsors
ʕ •ᴥ•ʔ made in montana