Repolode
bigskysoftware

bigskysoftware/htmx

htmx lets you issue AJAX, WebSocket, and Server-Sent Events requests and swap page content directly from HTML attributes, with no custom JavaScript.

Stars
49,579
Forks
1,694
Open issues
303
Last commit
3 days ago

What is it?

htmx extends HTML so that any element can make HTTP requests, be triggered by any event, and replace any part of the page with the server's response. Behavior is declared with attributes such as hx-post and hx-swap, so interactive interfaces can be built while keeping the server responsible for returning HTML fragments.

The library is small, has no dependencies, and is designed to be extended through a set of official extensions. It also supports CSS transitions and WebSocket and SSE connections, covering common real-time UI patterns without a client-side framework.

htmx is a successor to intercooler.js and is distributed as the htmx.org npm package or via a CDN script tag.

Key features

  • 01Issue AJAX requests from any element using attributes like hx-get and hx-post.
  • 02Swap response content into any part of the page with configurable swap strategies.
  • 03Trigger requests from any DOM event, not only click and submit.
  • 04Support WebSockets and Server-Sent Events directly in HTML.
  • 05Dependency-free and small enough to drop in with a single script tag.
  • 06Extend behavior through a set of official extensions.

Use cases

  • Adding interactive updates such as inline editing or live search to a server-rendered web app.
  • Building real-time dashboards that push updates over WebSockets or SSE.
  • Progressively enhancing an existing multi-page site without rewriting it as a single-page app.

Topics

FAQ

What is htmx?
htmx lets you issue AJAX, WebSocket, and Server-Sent Events requests and swap page content directly from HTML attributes, with no custom JavaScript. htmx extends HTML so that any element can make HTTP requests, be triggered by any event, and replace any part of the page with the server's response. Behavior is declared with attributes such as hx-post and hx-swap, so interactive interfaces can be built while keeping the server responsible for returning HTML fragments.
Is htmx free to use? What license does it have?
htmx is open source under the Other license. Check the license terms before using it in commercial products.
Is htmx still maintained?
Actively maintained. The last commit to htmx was on Oct 15, 2026.
What can I use htmx for?
Adding interactive updates such as inline editing or live search to a server-rendered web app. Building real-time dashboards that push updates over WebSockets or SSE. Progressively enhancing an existing multi-page site without rewriting it as a single-page app.
Where can I get htmx?
The source code and installation instructions are on GitHub: https://github.com/bigskysoftware/htmx

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects