Hasty Briefsbeta

Htmx: Access modern browser features directly from HTML

a day ago
  • #hypermedia
  • #web-development
  • #htmx
  • htmx provides AJAX, CSS Transitions, WebSockets, and Server Sent Events directly in HTML using attributes.
  • htmx is small (~16k min.gz’d), dependency-free, extendable, and reduces code base sizes by 67% compared to React.
  • htmx allows <a> and <form> elements to make HTTP requests, with click and submit events triggering them, supporting GET and POST methods.
  • htmx completes HTML as a hypertext by removing constraints.
  • Example usage: <button hx-post='/clicked' hx-swap='outerHTML'>Click Me</button> triggers an AJAX request to '/clicked' and replaces the button with the response.
  • htmx is the successor to intercooler.js.
  • htmx 2.x has dropped IE support; use 1.x for IE compatibility.
  • Hypermedia Systems, a book on building Hypermedia-Driven Applications using htmx, has been released.
  • htmx development is supported via GitHub Sponsors.