Getting Started
Core Concepts
Control
Interactivity
Performance
Pushing Data
HTMX Extensions
Miscellaneous
Configuration
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:
Default extensions should be included in your project by adding the following attribute to your html tag.
h.Html(
h.HxExtension(h.BaseExtensions())
)
Copy
1h.Html(
2 h.HxExtension(h.BaseExtensions())
3)
h.HxExtensions(
h.BaseExtensions(), "my-extension"
)
Copy
1h.HxExtensions(
2 h.BaseExtensions(), "my-extension"
3)
h.JoinExtensions(
h.HxExtension("sse"),
h.HxExtension("my-extension"),
)
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.