htmx: Build Interactive Interfaces with HTML Attributes

Summary
htmx lets web developers trigger HTTP requests and update parts of a page through HTML attributes, reducing the need for custom JavaScript in server-driven interfaces. It supports AJAX, CSS transitions, WebSockets, and server-sent events without dependencies.
At a glance
- Language
- JavaScript
- License
- NOASSERTION
- Stars
- 49.5k
- Forks
- 1.7k
- Added to OSRepos
- December 1, 2025
- Last analyzed
- October 3, 2026
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Overview
htmx is a JavaScript library that extends HTML so elements can make HTTP requests in response to user events and update selected parts of a page with the server response. It addresses the gap between basic links and forms and the richer interactions often implemented with client-side JavaScript.
It suits developers who want to build interactive web pages while keeping application behavior close to HTML and server-rendered responses. The project describes itself as small, dependency-free, and extendable.
Key Features
- Trigger AJAX requests from HTML attributes on elements beyond links and forms.
- Configure requests for events beyond clicks and form submissions.
- Support HTTP methods beyond GET and POST.
- Choose how and where a response updates the page, including replacing an element.
- Provide CSS transition support.
- Support WebSockets and server-sent events through extensions.
- Extend behavior with an extensions system.
Use Cases
- Server-rendered applications that need interactive controls without adopting a full client-side framework.
- Forms or buttons that should submit requests and update only a portion of the page.
- Teams that prefer to keep request and update behavior expressed in HTML alongside server-rendered views.
- Interfaces that need event-driven updates over WebSockets or server-sent events using the available extensions.
Project Facts
- Language: JavaScript
- License: NOASSERTION
- Stars: 49.5k
- Forks: 1.7k
- Topics: hateoas, html, htmx, hyperscript, javascript, rest
- Archived: false
Getting Started
Install the npm package:
npm install htmx.org --save
For browser usage, documentation, and setup details, see the README and official documentation.
Alternatives
- react: React builds interfaces from JavaScript components and client-side state, while htmx uses HTML attributes to issue requests and swap server-rendered content.
Considerations
htmx is a JavaScript library, so browser use requires loading it into the page. Its HTML-oriented approach is a good fit for server-driven interfaces, but teams seeking a client-side component framework may prefer a different architecture. The repository reports its license as NOASSERTION, so verify applicable licensing terms before adopting it.
Found this useful?
Share it with someone who would like htmx.
Comparisons
Source repository
Open the original repository on GitHub.
23 counted GitHub visits
Related repositories
Similar repositories that may be relevant next.

gods-eye-view: Explore Live Data on a 3D Globe
September 23, 2026
God's Eye View combines public geospatial feeds on an interactive 3D globe, with tools for tracking aircraft, ships, satellites, weather and more. It is a locally run browser app for developers, researchers and curious users exploring spatial data.

Orkas: Coordinate AI Agent Teams from a Desktop App
September 13, 2026
Orkas is a local-first desktop app for directing a Commander and specialist AI agents from one chat. It suits people who want to coordinate research, document work, and coding tools locally, using their own model keys.

agenttrail: Observe AI Coding Agents Locally
September 3, 2026
Agenttrail turns local file changes and supported coding-agent activity into project maps and a 3D task view. It helps developers follow progress and spot work that needs attention without managing agents or sending data to a cloud service.

agent-skills: Give Coding Agents Engineering Workflows
August 14, 2026
A portable set of structured engineering workflows for AI coding agents, covering work from requirements and planning through testing, review, and release. Useful for teams that want agents to follow consistent quality and verification practices.