finds.dev

angelofallars/htmx-go

</> Build awesome HTMX + Go projects faster.

View on GitHubHomepage ↗

★ 807GoMITupdated Nov 2024

// the take

A thin Go wrapper that gives you typed constants and a fluent builder for HTMX request/response headers. Solves a real annoyance: hand-writing HX-Trigger JSON and swap modifier strings is error-prone and the library handles the serialization correctly. Aimed at Go devs building server-rendered apps with HTMX who want compiler help instead of stringly-typed header values.

Type-safe swap modifiers with method chaining (SwapBeforeEnd.Scroll(htmx.Bottom)) catch typos at compile time instead of runtime. Trigger serialization is genuinely useful — building HX-Trigger JSON by hand with multiple events is the kind of thing that silently breaks. The Clone() pattern for reusable global response writers is well thought out. Templ integration via RenderTempl() is a nice touch that avoids the ordering bug where writing headers after the body is already started gets silently ignored.

807 stars but only 22 forks and last push November 2024 — this project looks effectively unmaintained. No support for HX-Push-Url with false (disable push), and LocationObject for HX-Location with source/handler/select fields isn't covered. The library is also extremely thin: you could implement everything here in an afternoon, so the dependency might not be worth it for a long-lived project if the author stops cutting releases for new HTMX versions. No middleware helpers for common patterns like full-page vs partial rendering based on HX-Request.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
807
Forks
22
Language
Go
License
MIT
Last commit
30 Nov 2024

// nearby

If htmx-go isn't quite it.

All repos →