# Modern frontends with htmx 2nd edition release

Author: [Wim Deblauwe](https://www.wimdeblauwe.com/about/) | Published: 2026-11-23 | Topics: htmx, thymeleaf, spring-boot | Canonical: https://www.wimdeblauwe.com/blog/2026/11/23/modern-frontends-with-htmx-2nd-edition-release/

🎉 The 2nd edition of my book [Modern frontends with htmx](https://www.wimdeblauwe.com/books/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 `ttcli` now use [Vite](https://vite.dev/) for a fast development loop.

Several chapters also received updates to their content:

- **Chapter 6**: returning multiple fragments now uses Spring’s own `FragmentsRendering` instead of `HtmxResponse`.
- **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](https://shadleaf.dev/) 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](https://github.com/wimdeblauwe/modern-frontends-with-htmx-sources).

## Get the book

If you already bought Modern frontends with htmx on [Leanpub](https://leanpub.com/modern-frontends-with-htmx), you can download the 2nd edition for free.

If you don’t have the book yet, head over to the [Modern frontends with htmx](https://www.wimdeblauwe.com/books/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](https://leanpub.com/b/modern-thymeleaf-bundle) with both books.

If you have any questions or remarks, feel free to post a comment at [GitHub discussions](https://github.com/wimdeblauwe/wimdeblauwe.com/discussions).

