Skip to content

Htmx for ProcessWire

Htmx (trk/processwire-htmx) is the standalone HTMX 4 hypermedia framework for ProcessWire 3. Build interactive search filters, live pagination, inline editors, and multi-target HTML updates directly in PHP with zero frontend bundler required.

Shape-Compiled Stateless Ui

Author reusable Ui primitives with named Zones, Slots, Value Gates, and XSS-safe AttributeBag rendering compiled once per layout shape into HtmxCache (site/assets/cache/Htmx/).

HKDF-Signed Stateful Components

Build server-driven Component classes whose hx__state payloads are authenticated via HKDF-SHA256, bound to user, session, endpoint, page, and admin context, and guarded by CSRF + authorizeAction().

HTMX 4 Request, Response & Partials

Inspect HX-* headers with $htmx->request, emit HX-Redirect, HX-Trigger, HX-Reswap, HTTP 286 stopPolling(), and multi-target <hx-partial> responses with $htmx->response and $htmx->fragment.

16 Bundled Extensions & Tracy Panel

Load any of 16 bundled HTMX 4 extensions (hx-ws, hx-sse, hx-preload, hx-head, hx-csp, and more) plus optional Hyperscript and HtmxTracyPanel diagnostics on demand.

Requirement Minimum Version Notes
PHP 8.2+ Uses strict types, HKDF-SHA256 (hash_hkdf), and PHP 8 attributes/reflection.
ProcessWire 3.0.210+ Standalone module with zero first-party module dependencies; exposes $this->wire()->htmx and $this->wire()->htmxCache.
userAuthSalt >= 16 characters Required in site/config.php for SignedStateCodec HKDF state signing.
CLI Tooling processwire-console (optional) Unlocks make:htmx:component, make:htmx:ui, and htmx:cache:clear.

Next steps