Search by

webware / webware-htmx

tyrsson

Provides HTMX support via laminas-view to webware applications.

Package info

github.com/webinertia/webware-htmx

pkg:composer/webware/webware-htmx

Statistics

Installs: 2

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 2

0.1.x-dev 2026-08-24 23:24 UTC

This package is auto-updated.

Last update: 2026-09-08 22:48:21 UTC


README

Provides HTMX support via laminas-view to webware applications: AJAX request detection middleware, HTMX response headers and triggers, and a body-aware laminas-view renderer.

PHP Version Latest Version License Continuous Integration codecov Mutation testing badge

Installation

composer require webware/webware-htmx

Register the ConfigProvider in your Mezzio application config aggregator:

Webware\Htmx\ConfigProvider::class,

What it provides

  • DetectAjaxRequestMiddleware — detects HTMX requests and filters the incoming server request.
  • DisableBodyMiddleware — disables the body layer for HTMX requests.
  • Webware\Htmx\Response\Header — HTMX response header helpers (HX-Trigger, HX-Redirect, …).
  • Webware\Htmx\View\LaminasRenderer — a laminas-view renderer with body/layout layering, registered as the default TemplateRendererInterface.
  • A default body::default template (app-overridable).

Template override

The default body template ships at body::default. Applications override it by registering their own templates.map['body::default'] path before the package ConfigProvider in the config aggregator.