htmx: Build Interactive Interfaces with HTML Attributes

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
View on GitHub

Topics

Click on any tag to explore related repositories

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

View on GitHub

Related repositories

Similar repositories that may be relevant next.

OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️