bigskysoftware /htmx
</> htmx - high power tools for HTML
★ 49,623⑂ 1,814👁 212⑃ 1,883● 1,838▤ 37◈ 410
49,623
stars
+4
1,814
forks
212
watchers
1,883
prs
1,838
issues
37
releases
410
discussions
README
high power tools for HTML
introduction
htmx allows you to access AJAX, CSS Transitions,
WebSockets and Server Sent Events
directly in HTML, using attributes, so you can build
modern user interfaces with the simplicity and
power of hypertext
htmx is small (~14k min.gz'd),
dependency-free &
extendable
motivation
Why should only and be able to make HTTP requests?
Why should only click & submit events trigger them?
Why should only GET & POST be available?
Why should you only be able to replace the entire screen?
By removing these arbitrary constraints htmx completes HTML as a
hypertext
quick start
html
Click Me
The hx-post and hx-swap attributes tell htmx:
"When a user clicks on this button, issue an AJAX request to /clicked, and replace the entire button with the response"
htmx is the successor to intercooler.js
installing as a node package
To install using npm:
npm install htmx.org --save
Note there is an old broken package called htmx. This is htmx.org.
website & docs
contributing
Want to contribute? Check out our contribution guidelines
No time? Then become a sponsor
hacking guide
To develop htmx locally, you will need to install the development dependencies.
Run:
npm install
Then, run a web server in the root.
This is easiest with:
npx serve
You can then run the test suite by navigating to:
At this point you can modify /src/htmx.js to add features, and then add tests in the appropriate area under /test.
/test/index.html - the root test page from which all other tests are included
/test/attributes - attribute specific tests
/test/core - core functionality tests
/test/core/regressions.js - regression tests
/test/ext - extension tests
/test/manual - manual tests that cannot be automated
htmx uses the mocha testing framework, the chai assertion framework
and sinon to mock out AJAX requests. They are all OK.
haiku
javascript fatigue:
longing for a hypertext
already in handTop issues
#2264Running ready function on readyState === 'interactive'22 comments · 2024-01-31#4070head extension mishandles title16 comments · 2026-09-12#2147With multiple htmx.ajax requests only the first call is executed16 comments · 2024-01-02#2786HX-Trigger header isn't shown in a back-end11 comments · 2024-08-02#1870json-enc only sends strings in request11 comments · 2023-10-07#3189When the response contains "HX-Redirect" the hx-indicator element is not deactivated. (htmx-v2)10 comments · 2025-02-14#3082Static template that doesn't parse the response10 comments · 2024-12-17#3016Unable to disable inherit for hx-ext with hx-disinherit or htmx.config.disableInheritance10 comments · 2024-11-12
Discussions
#4106HX-Prompt hack/fix0 comments · 2026-09-25#4048RFC: polling is the element's lifetime (htmx 4, #4040)1 comments · 2026-09-07#4046RFC: a closed, testable HCON grammar (no regex, hosts interpret maps)1 comments · 2026-09-07#4013htmx4 hx-include ignores css pseudo-classes1 comments · 2026-09-03#3996When events are queued, when do values get computed?2 comments · 2026-09-01#3936HaTchi-MaXchi — an htmx-native design system (Hyperparts, not “components”)0 comments · 2026-07-31#3877How does the HTMX release versioning and cycles work?2 comments · 2026-06-29#3860HTMX + TypeScript Backend: Building Server-Rendered Apps with StreetJS0 comments · 2026-06-22
Latest release
v4.0.1 v4.0.1 2026-11-01v4.0.1 Any trigger now cancels a pending delay or throttle trigger on the same element, as in 2.x Fixed an older response overwriting a newer one with hx-sync replace (4028) Fixed a response with only hx-partial blanking the body, and ignoreTitle support in hx-partial Improved history back and forward reliability, and fixed the hx-history-cache POST stamp (4067) hx-trigger now works on boosted elements (4127) every 2s [cond] now honors its filter (4133) Fixed the changed modifier on forms and multiple changed triggers on one element (4035, 4096) scrollTarget and showTarget now work wi