
Discover HTMX and its hyper script attributes that let any HTML element perform HTTP requests and swap content without writing JavaScript.
Set up a basic Node.js and Express backend with a public directory to serve html files, install Node.js, npm, Express, and nodemon, and configure a dev script using import syntax.
Create server.js as the backend entry point, import and initialize express, serve a static public folder, parse json and urlencoded form data, and start the server on port 3000.
Create a public folder for html files and add an index.html with a hello world page, serve it via a static server, and learn html installation via CDN with Bootstrap.
Learn to trigger a fetch from your api using hx-get by clicking a button that sends an ajax get to /users, returning a list of users rendered in the page.
Learn how hx-swap replaces the triggering button with the response, using outerhtml or innerhtml, and how hx-target directs the output to a specific element, with hx-confirm for confirmations.
Learn to fetch data from an API using JSON placeholders, replacing a hard coded user array with an async fetch that returns JSON and displays user names.
Explore how the hx-indicator attribute shows a loading spinner while waiting for the server, by wiring a Bootstrap spinner with id loading and the html indicator class.
Create a bmi calculator form with height and weight inputs in a bootstrap html project, using htmx to post to the backend endpoint and show result in the result element.
Create a post /calculate endpoint in server.js to compute BMI from height and weight in the request body, using height squared and floats, and return a two-decimal template string.
Implement polling by sending a request to the get price endpoint every five seconds to simulate a bitcoin price tracker app, updating the displayed price in real time.
Build a search widget using HTMX that fires post requests on each keystroke with a 500ms delay, updating a table of user results from a JSON placeholder API.
In the HTMX crash course, learn to retrieve and filter users by name or email in real time, using lowercase normalization and dynamic search result HTML displayed as a table.
Implement inline email validation with an ajax request to a dedicated email endpoint, returning HTML to swap the input's div with success or error alerts.
HTMX is an amazing JavaScript library that helps you avoid writing client-side JavaScript code!
In this course, we take you on a fun, hands-on crash course to learning HTMX.
You'll start building your first app with HTMX within minutes.
Every section is written in a bite-sized manner and straight to the point as I don’t want to waste your time (and most certainly mine) on the content you don't need.
The goal of this book is to teach you HTMX in a manageable way without overwhelming you.
We focus only on the essentials and cover the material in a hands-on practice manner for you to code along.
I'll walk you through all core HTMX concepts step-by-step, without any prior HTMX knowledge assumed!
In this course, we will cover:
Chapter 1: Introduction to HTMX
Chapter 2: BMI Calculator
Chapter 3: Polling – Bitcoin Price Tracker App
Chapter 4: Building a Search Widget
Chapter 5: Form Inline Validation
Chapter 6: Show Edit Form and Update
And you'll learn all that by working on multiple demo projects which allow you to dive deeper and deeper into HTMX.
Therefore, by the end of the course, you'll be able to add HTMX to your next web projects and reap its benefits!