Installation & Requirements
System Requirements
Section titled “System Requirements”- PHP:
8.2or higher - ProcessWire:
3.0.210or higher - First-Party Module Dependencies: None (
Htmxis a standalone module) - Security Prerequisite:
$config->userAuthSaltinsite/config.phpmust be at least 16 characters long (required bySignedStateCodecHKDF-SHA256 signing) - Optional CLI Integration:
trk/processwire-consoleformake:htmx:component,make:htmx:ui, andhtmx:cache:clear
Installing the Module
Section titled “Installing the Module”-
Require the package from your project root:
Terminal window composer require trk/processwire-htmx -
Refresh and install
Htmx:Terminal window php vendor/bin/wire module:refreshphp vendor/bin/wire module:install Htmx
- Log in as a superuser and navigate to Modules -> New.
- Use Add Module from Directory (enter
Htmx), Add Module from URL, or Add Module from Upload (ZIP archive). - Click Modules -> Refresh, locate
Htmxunder the Site tab, and click Install.
- Download and extract the release archive into
site/modules/Htmx/. - Open Modules -> Refresh in the ProcessWire admin (or run
php vendor/bin/wire module:refresh). - Click Install next to
Htmxunder Modules -> Site.
Once installed, Htmx registers $this->wire()->htmx and $this->wire()->htmxCache automatically. Configure module settings at Modules -> Configure -> Htmx as needed.
All 12 Module Configuration Properties
Section titled “All 12 Module Configuration Properties”| Property | Default | Description |
|---|---|---|
endpointUrl |
'/hx/req' |
Unified URL path handled by Htmx::handleEndpoint() for stateful component requests. |
componentsPath |
'components/' |
Directory relative to site/templates/ scanned or resolved for Component classes and views. |
uiPath |
'ui/' |
Directory relative to site/templates/ for stateless Ui classes and templates. |
allowComponentPaths |
false |
Allows dynamic class path resolution from componentsPath when true. Keep false in production and register components explicitly with registerComponent(). |
loadFrontendAssets |
true |
Automatically injects the bundled HTMX 4 client script on frontend pages. |
loadHyperscript |
false |
Automatically injects the bundled Hyperscript runtime alongside HTMX 4. |
autoFlashMessages |
true |
Automatically attaches ProcessWire session notices to HTMX responses. |
autoExtractTargets |
false |
Extracts only the requested HX-Target element when intercepting full-page renders. |
tracySupport |
true |
Enables HtmxTracyPanel and diagnostic X-PW-HTMX-* headers when TracyDebugger is active in debug mode. |
cacheEnabled |
true |
Enables HtmxCache shape compilation, component schema caching, and render caching under site/assets/cache/Htmx/. |
cacheMaxShapesPerClass |
64 |
Maximum distinct compiled UI shapes cached per Ui class before eviction. |
extensions |
[] |
Array of bundled HTMX 4 extension names to load globally (out of 16 available extensions). |