Examples

Every example ships in the repository under examples/ and runs with ghtmx generate && go run ./cmd

Hello world

The walking skeleton: one template, one route, one rendered page.

Live demo ↗

Route bindings

Symbol and constructor bindings: every htmx URL is resolved against a real Go route at build time.

Live demo ↗

Fragments

Compile-time fragments rendered inline in a page and standalone for htmx swaps, byte-identically.

Live demo ↗

Events

The server-driven event contract: declared events, generated HX-Trigger emitters, and CSRF headers.

Live demo ↗

CRUD todos

The reference application: full CRUD with partial updates and zero hand-written htmx glue.

Live demo ↗