{"name":"htmx: High Power Tools for HTML for Modern Web Interfaces","description":"htmx is a lightweight, dependency-free JavaScript library that extends HTML with powerful capabilities for building modern user interfaces. It allows developers to access AJAX, CSS Transitions, WebSockets, and Server Sent Events directly in HTML using attributes, simplifying web development by completing HTML as a hypertext.","github":"https://github.com/bigskysoftware/htmx","url":"https://osrepos.com/repo/bigskysoftware-htmx","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/bigskysoftware-htmx","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/bigskysoftware-htmx.md","json":"https://osrepos.com/repo/bigskysoftware-htmx.json","topics":["htmx","JavaScript","HTML","Web Development","AJAX","Frontend","HATEOAS","REST"],"keywords":["htmx","JavaScript","HTML","Web Development","AJAX","Frontend","HATEOAS","REST"],"stars":null,"summary":"htmx is a lightweight, dependency-free JavaScript library that extends HTML with powerful capabilities for building modern user interfaces. It allows developers to access AJAX, CSS Transitions, WebSockets, and Server Sent Events directly in HTML using attributes, simplifying web development by completing HTML as a hypertext.","content":"## Introduction\nhtmx is a modern, dependency-free JavaScript library that empowers developers to build dynamic user interfaces directly within HTML. It extends HTML's capabilities, allowing you to access AJAX, CSS Transitions, WebSockets, and Server Sent Events using simple attributes. This approach simplifies web development by enabling rich interactivity without extensive JavaScript frameworks, promoting the simplicity and power of hypertext. htmx is notably small, around 14KB minified and gzipped, and is highly extendable.\n\n## Installation\nYou can quickly integrate htmx into your project using a CDN or by installing it as a Node package.\n\nTo include htmx via CDN, add the following script tag to your HTML:\nhtml\n  <script src=\"https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js\"></script>\n\n\nTo install using npm:\nbash\nnpm install htmx.org --save\n\n*Note: Ensure you install `htmx.org` as there is an older, unrelated package named `htmx`.*\n\n## Examples\nhtmx makes it straightforward to add dynamic behavior. Here's a quick example demonstrating how to make a button trigger an AJAX request and update its content:\n\nhtml\n  <button hx-post=\"/clicked\" hx-swap=\"outerHTML\">\n    Click Me\n  </button>\n\nIn this example, the `hx-post` attribute tells htmx to issue an AJAX POST request to `/clicked` when the button is clicked. The `hx-swap=\"outerHTML\"` attribute instructs htmx to replace the entire button element with the response received from the server.\n\n## Why Use htmx?\nhtmx addresses fundamental limitations in traditional HTML, challenging the arbitrary constraints that restrict its capabilities. It questions why only `<a>` and `<form>` tags should make HTTP requests, why only `click` and `submit` events should trigger them, and why only GET and POST methods should be available. Furthermore, it challenges the notion that only the entire screen can be replaced. By removing these constraints, htmx completes HTML as a true hypertext, allowing for more flexible and powerful web interactions directly from your markup. It is the successor to [intercooler.js](http://intercoolerjs.org), building on its principles.\n\n## Links\n*   Official Website: <https://htmx.org>\n*   Documentation: <https://htmx.org/docs>\n*   GitHub Repository: <https://github.com/bigskysoftware/htmx>","metrics":{"detailViews":6,"githubClicks":7},"dates":{"published":null,"modified":"2025-12-01T08:00:51.000Z"}}