Search by

berry / htmx

atomicptr

HTMX extension for berry/html

Package info

github.com/berry-php/htmx

pkg:composer/berry/htmx

Statistics

Installs: 1 252

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 2

v0.5.0 2026-10-27 12:13 UTC

This package is auto-updated.

Last update: 2026-10-27 16:19:02 UTC


README

HTMX (v4) extension for berry/html

Usage

Install via composer

$ composer req berry/htmx
<?php

function renderCounterButton(int $value): Element
{
    return button()
        ->hxPost("/counter/{$value + 1}")
        ->hxSwap(HxSwap::OuterHTML)
        ->text("+$value");
}

PHPStan

If you're using phpstan (you should), you will also need to install phpstan/extension-installer so that the extension methods are automatically detected.

License

MIT