HTMX Extensions

htmgo provides a few extra htmx extensions to make common tasks easier.

Some of these extensions are optional, and some of these are required for htmgo to work correctly.

The following extensions are provided by htmgo:

Trigger ChildrenMutation ErrorPath Deps

Default extensions should be included in your project by adding the following attribute to your html tag.

Copy
1h.Html(
2    h.HxExtension(h.BaseExtensions())
3)
If you need to combine multiple extensions, you can use:
Copy
1h.HxExtensions(
2	h.BaseExtensions(), "my-extension"
3)
or
Copy
1h.JoinExtensions(
2    h.HxExtension("sse"),
3    h.HxExtension("my-extension"),
4)

Important: h.BaseExtensions will add the 'htmgo' extension, which is a required extension for inline scripts to work properly, please always include it in your project.