Skip to content

Twig function

We provide a twig function create_htmx that returns a new HtmxAttributeBuilder instance. This object uses the Htmx class to build attributes and when cast to a string, it casts the internal Attribute object to a string.

This function then can be used to obtain an object to build HTMX attributes in a Twig template.