Add interactivity to server-rendered HTML with htmx

8 steps · about 2 h 20 min · Beginner

  1. Read the htmx introduction (article, htmx, 25 min)

    Explains hx-get, hx-post, targets and swaps with small examples.

  2. Look up attributes, headers and events (reference, htmx, 10 min)

    One page to check every hx- attribute while you build.

  3. Build click-to-edit (tutorial, htmx, 15 min)

    A complete pattern that swaps a view for a form and back.

  4. Build an active search box (tutorial, htmx, 15 min)

    Shows triggers with delays for search-as-you-type.

  5. Add infinite scroll (tutorial, htmx, 10 min)

    Loads the next page of rows when the last one is revealed.

  6. Understand hypermedia as the engine of state (article, htmx, 15 min)

    Gives the idea behind returning HTML instead of JSON.

  7. Read Hypermedia Systems for the bigger picture (article, Hypermedia Systems, 40 min)

    A free book on building whole apps in this style.

  8. Pick the right HTTP method for each action (reference, MDN, 10 min)

    htmx exposes GET, POST, PUT, PATCH and DELETE directly.