Documentation
¶
Overview ¶
Package htmx provides HTMX attributes and helpers for gomponents. See https://htmx.org/
Index ¶
- func Boost(v string) g.Node
- func Confirm(v string) g.Node
- func Delete(v string) g.Node
- func Disable(v string) g.Node
- func DisabledElt(v string) g.Node
- func Disinherit(v string) g.Node
- func Encoding(v string) g.Node
- func Ext(v string) g.Node
- func Get(url string) g.Node
- func Headers(v string) g.Node
- func History(v string) g.Node
- func HistoryElt(v string) g.Node
- func Include(v string) g.Node
- func Indicator(v string) g.Node
- func On(name string, v string) g.Node
- func Params(v string) g.Node
- func Patch(v string) g.Node
- func Post(url string) g.Node
- func Preserve(v string) g.Node
- func Prompt(v string) g.Node
- func PushURL(v string) g.Node
- func Put(v string) g.Node
- func ReplaceURL(v string) g.Node
- func Request(v string) g.Node
- func Select(v string) g.Node
- func SelectOOB(v string) g.Node
- func Swap(v string) g.Node
- func SwapOOB(v string) g.Node
- func Sync(v string) g.Node
- func Target(v string) g.Node
- func Trigger(v string) g.Node
- func Validate(v string) g.Node
- func Vals(v string) g.Node
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Boost ¶
Boost to add or remove progressive enhancement for links and forms. See https://htmx.org/attributes/hx-boost
func Confirm ¶
Confirm shows a confirm() dialog before issuing a request. See https://htmx.org/attributes/hx-confirm
func Delete ¶
Delete will issue a DELETE to the specified URL and swap the HTML into the DOM using a swap strategy. See https://htmx.org/attributes/hx-delete
func Disable ¶
Disable htmx processing for the given node and any children nodes. See https://htmx.org/attributes/hx-disable
func DisabledElt ¶
Disable element until htmx request completes. See https://htmx.org/attributes/hx-disabled-elt/
func Disinherit ¶
Disinherit controls and disables automatic attribute inheritance for child nodes. See https://htmx.org/attributes/hx-disinherit
func Encoding ¶
Encoding changes the request encoding type. See https://htmx.org/attributes/hx-encoding
func Ext ¶
Ext sets extensions to use for this element. See https://htmx.org/attributes/hx-ext
func Get ¶
Get from the specified URL. See https://htmx.org/attributes/hx-get
Example ¶
n := Button(hx.Post("/clicked"), hx.Swap("outerHTML")) _ = n.Render(os.Stdout)
Output: <button hx-post="/clicked" hx-swap="outerHTML"></button>
func Headers ¶
Headers adds to the headers that will be submitted with the request. See https://htmx.org/attributes/hx-headers
func History ¶
History prevents sensitive data being saved to the history cache. See https://htmx.org/attributes/hx-history
func HistoryElt ¶
HistoryElt sets the element to snapshot and restore during history navigation. See https://htmx.org/attributes/hx-history-elt
func Include ¶
Include additional data in requests. See https://htmx.org/attributes/hx-include
func Indicator ¶
Indicator sets the element to put the htmx-request class on during the request. See https://htmx.org/attributes/hx-indicator
func On ¶
On handles any event with a script inline. See https://htmx.org/attributes/hx-on
func Params ¶
Params filters the parameters that will be submitted with a request. See https://htmx.org/attributes/hx-params
func Patch ¶
Patch issues a PATCH to the specified URL. See https://htmx.org/attributes/hx-patch
func Post ¶
Post to the specified URL. See https://htmx.org/attributes/hx-post
func Preserve ¶
Preserve specifies elements to keep unchanged between requests. See https://htmx.org/attributes/hx-preserve
func Prompt ¶
Prompt shows a prompt() before submitting a request. See https://htmx.org/attributes/hx-prompt
func PushURL ¶
PushURL into the browser location bar, creating a new history entry. See https://htmx.org/attributes/hx-push-url
func Put ¶
Put issues a PUT to the specified URL. See https://htmx.org/attributes/hx-put
func ReplaceURL ¶
ReplaceURL replaces the URL in the browser location bar. See https://htmx.org/attributes/hx-replace-url
func Request ¶
Request configures various aspects of the request. See https://htmx.org/attributes/hx-request
func Select ¶
Select content to swap in from a response. See https://htmx.org/attributes/hx-select
func SelectOOB ¶
SelectOOB content to swap in from a response, out of band (somewhere other than the target). See https://htmx.org/attributes/hx-select-oob
func Swap ¶
Swap controls how content is swapped in. See https://htmx.org/attributes/hx-swap
func SwapOOB ¶
SwapOOB marks content in a response to be out of band (should swap in somewhere other than the target). See https://htmx.org/attributes/hx-swap-oob
func Sync ¶
Sync controls how requests made by different elements are synchronized. See https://htmx.org/attributes/hx-sync
func Target ¶
Target specifies the target element to be swapped. See https://htmx.org/attributes/hx-target
func Trigger ¶
Trigger specifies the event that triggers the request. See https://htmx.org/attributes/hx-trigger
func Validate ¶
Validate forces elements to validate themselves before a request. See https://htmx.org/attributes/hx-validate
Types ¶
This section is empty.