latest
in NPM so that people using the1.x line are not accidentally upgraded. We will mark2.0 aslatest
at some point in 2025.htmx gives you access toAJAX,CSS Transitions,WebSockets andServer Sent Eventsdirectly in HTML, usingattributes, so you can buildmodern user interfaces with thesimplicity andpower of hypertext
htmx is small (~14k min.gz’d),dependency-free,extendable & hasreduced code base sizes by67% when compared with react
<a>
&<form>
be able to make HTTP requests?click
&submit
events trigger them?GET
&POST
methods beavailable?By removing these constraints, htmx completes HTML as ahypertext
<scriptsrc="https://unpkg.com/htmx.org@2.0.4"></script><!-- have a button POST a click via AJAX --> <buttonhx-post="/clicked"hx-swap="outerHTML"> Click Me </button>
Thehx-post
andhx-swap
attributes onthis 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 tointercooler.js
Read thedocs introduction for a more in-depth… introduction.
Note that htmx 2.x has dropped IE support. If you require IE support you can use the1.xcode-line, which will be supported in perpetuity.
We are happy to announce the release ofHypermedia Systems, a book on how to buildHypermedia-Driven Applications using htmx & more:
htmx development can be supported viaGitHub Sponsors
Thank you to all our generoussupporters, including: