🎉 The 2nd edition of my book Modern frontends with htmx is out! It has been updated for Spring Boot 4 and htmx 4, and every chapter and example project has been reworked along the way.
What is new in the 2nd edition?
The most important changes are:
-
Spring Boot 4.1.3 and Java 25: all code in the book now runs on the latest Spring Boot and the current LTS version of Java.
-
htmx 4: the book uses the newest major version of htmx.
-
htmx-spring-boot-thymeleaf 6.0.1: the integration library has been updated to match.
-
Tailwind CSS 4: all example projects are styled with the latest Tailwind CSS.
-
Vite for live reload: all projects generated with
ttclinow use Vite for a fast development loop.
Several chapters also received updates to their content:
-
Chapter 6: returning multiple fragments now uses Spring’s own
FragmentsRenderinginstead ofHtmxResponse. -
Chapter 7: the example calls the JSONPlaceholder API, with the HTTP service client created via
@ImportHttpServices. -
Chapter 8: a new section explains the automatic CSRF token handling with the
hx:attributes of htmx-spring-boot-thymeleaf. -
Chapter 9: the UI is built with Shadleaf components.
-
Chapter 10: Shoelace has been replaced with its successor, Web Awesome.
-
Chapter 11: the Server-Sent Events and WebSocket examples use the extensions that ship with htmx 4, and the styling uses daisyUI 5.
All screenshots have been updated as well.
The source code of all the examples is available on GitHub.
Get the book
If you already bought Modern frontends with htmx on Leanpub, you can download the 2nd edition for free.
If you don’t have the book yet, head over to the Modern frontends with htmx page for more information and the links to buy it. If you are interested in Taming Thymeleaf as well, check out the bundle with both books.
If you have any questions or remarks, feel free to post a comment at GitHub discussions.