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 ¶ added in v0.3.0
Confirm shows a confirm() dialog before issuing a request. See https://htmx.org/attributes/hx-confirm
func Delete ¶ added in v0.3.0
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 ¶ added in v0.3.0
Disable htmx processing for the given node and any children nodes. See https://htmx.org/attributes/hx-disable
func DisabledElt ¶ added in v0.5.0
Disable element until htmx request completes. See https://htmx.org/attributes/hx-disabled-elt/
func Disinherit ¶ added in v0.3.0
Disinherit controls and disables automatic attribute inheritance for child nodes. See https://htmx.org/attributes/hx-disinherit
func Encoding ¶ added in v0.3.0
Encoding changes the request encoding type. See https://htmx.org/attributes/hx-encoding
func Ext ¶ added in v0.3.0
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 ¶ added in v0.3.0
Headers adds to the headers that will be submitted with the request. See https://htmx.org/attributes/hx-headers
func History ¶ added in v0.3.0
History prevents sensitive data being saved to the history cache. See https://htmx.org/attributes/hx-history
func HistoryElt ¶ added in v0.3.0
HistoryElt sets the element to snapshot and restore during history navigation. See https://htmx.org/attributes/hx-history-elt
func Include ¶ added in v0.3.0
Include additional data in requests. See https://htmx.org/attributes/hx-include
func Indicator ¶ added in v0.3.0
Indicator sets the element to put the htmx-request class on during the request. See https://htmx.org/attributes/hx-indicator
func On ¶ added in v0.4.0
On handles any event with a script inline. See https://htmx.org/attributes/hx-on
func Params ¶ added in v0.3.0
Params filters the parameters that will be submitted with a request. See https://htmx.org/attributes/hx-params
func Patch ¶ added in v0.3.0
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 ¶ added in v0.3.0
Preserve specifies elements to keep unchanged between requests. See https://htmx.org/attributes/hx-preserve
func Prompt ¶ added in v0.3.0
Prompt shows a prompt() before submitting a request. See https://htmx.org/attributes/hx-prompt
func PushURL ¶ added in v0.2.0
PushURL into the browser location bar, creating a new history entry. See https://htmx.org/attributes/hx-push-url
func Put ¶ added in v0.3.0
Put issues a PUT to the specified URL. See https://htmx.org/attributes/hx-put
func ReplaceURL ¶ added in v0.3.0
ReplaceURL replaces the URL in the browser location bar. See https://htmx.org/attributes/hx-replace-url
func Request ¶ added in v0.3.0
Request configures various aspects of the request. See https://htmx.org/attributes/hx-request
func Select ¶ added in v0.2.0
Select content to swap in from a response. See https://htmx.org/attributes/hx-select
func SelectOOB ¶ added in v0.2.0
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 ¶ added in v0.2.0
Swap controls how content is swapped in. See https://htmx.org/attributes/hx-swap
func SwapOOB ¶ added in v0.2.0
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 ¶ added in v0.3.0
Sync controls how requests made by different elements are synchronized. See https://htmx.org/attributes/hx-sync
func Target ¶ added in v0.2.0
Target specifies the target element to be swapped. See https://htmx.org/attributes/hx-target
func Trigger ¶ added in v0.2.0
Trigger specifies the event that triggers the request. See https://htmx.org/attributes/hx-trigger
func Validate ¶ added in v0.3.0
Validate forces elements to validate themselves before a request. See https://htmx.org/attributes/hx-validate
Types ¶
This section is empty.