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

introduction

htmx gives you access to fetch(), CSS & View Transitions, SSE and more directly in HTML, using attributes, so you can build interactive interfaces with the simplicity and power of HTML.

htmx is small (~10k min.br’d), dependency-free, extendable & has reduced code base sizes by up to 67% when compared with react

motivation

By removing these constraints, htmx completes HTML as a hypertext

quick start

  <script src="https://cdn.jsdelivr.net/npm/htmx.org@4.0.0-alpha5/dist/htmx.min.js"></script>
  <!-- have a button POST a click via AJAX -->
  <button hx-post="/clicked" hx-swap="outerHTML">
    Click Me
</button>

The hx-post and hx-swap 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

Read the docs introduction for a more in-depth… introduction.

Thank you to all our generous sponsors, including:

Platinum Sponsor

ʕ •ᴥ•ʔ made in montana