Back to RIFE2

htmx

One element answers both a browser and htmx. A normal request gets the whole page, and each keystroke below is an htmx request that gets back only the updated list, served straight from a template block. No client-side rendering, no JSON, no hx-select.

  • Java
  • Kotlin
  • Scala
  • Groovy
  • Clojure
  • Python
  • Ruby
  • Rust
  • Go
  • TypeScript
  • Swift
  • Elixir

View the source: HtmxDemo.java and its template: htmx.html

The list is a named block. printHtmxFragment sends the whole stage on the first load and the full page on a direct visit, while each search sends back only the block that changed.