htmx: Why htmx

Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026

The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.


As a backend developer, htmx might be the best thing you stumble upon, as it lets you create quite complex experiences in your Web Application without using JavaScript.

As a frontend developer that knows and works with JavaScript or TypeScript all day long, you might wonder why use htmx instead of React or any other client-side library that you can use to build a UI?

The thing is this: if you’re building your application on top of one of those big frameworks (be it React, Vue, Angular, Svelte…) you are effectively building the application by using that particular framework (or library, whatever…) rules and conventions and patterns.

You are effectively a React developer, or Vue developer.

And guess what happens when you use those frameworks, typically? There’s a TON of JavaScript running under the hood to power your application.

With htmx instead you are much closer to the Web as a platform. You stay much closer to the HTML, to the browser, and to the client-server interaction.

You use much more native, built-in, platform APIs.

You use client-side JavaScript as a “scripting language” to build to interactive user interfaces, as it was intended.

Why htmx? Why not. You might discover a way of building Web Applications that totally reasons with how you think.

Lessons in this unit:

0: Introduction
1: ▶︎ Why htmx
2: The core idea of htmx
3: Installing htmx
4: Doing a GET request
5: Swap
6: POST request
7: Targets
8: Loading indicator
9: Confirming actions, and prompts
10: Triggers
11: Request headers
12: Response headers
13: Events
14: Redirect after request
15: Send files using htmx.ajax()
16: Perform something on page load
17: Conditionally hide HTML elements based on HTMX request status
18: htmx + Alpine template tag
19: htmx, include hidden input fields outside of a form
20: htmx trigger request via JS event