Add interactivity to server-rendered HTML with htmx
8 steps · about 2 h 20 min · Beginner
- Read the htmx introduction (article, htmx, 25 min)
Explains hx-get, hx-post, targets and swaps with small examples.
- Look up attributes, headers and events (reference, htmx, 10 min)
One page to check every hx- attribute while you build.
- Build click-to-edit (tutorial, htmx, 15 min)
A complete pattern that swaps a view for a form and back.
- Build an active search box (tutorial, htmx, 15 min)
Shows triggers with delays for search-as-you-type.
- Add infinite scroll (tutorial, htmx, 10 min)
Loads the next page of rows when the last one is revealed.
- Understand hypermedia as the engine of state (article, htmx, 15 min)
Gives the idea behind returning HTML instead of JSON.
- Read Hypermedia Systems for the bigger picture (article, Hypermedia Systems, 40 min)
A free book on building whole apps in this style.
- Pick the right HTTP method for each action (reference, MDN, 10 min)
htmx exposes GET, POST, PUT, PATCH and DELETE directly.