htmx

package
v0.0.0-...-d761283 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HxBoost

func HxBoost(value string) gomponents.Node

HxBoost returns a gomponents node with the hx-boost attribute set to the given value.

See https://htmx.org/attributes/hx-boost/

func HxConfirm

func HxConfirm(value string) gomponents.Node

HxConfirm returns a gomponents node with the hx-confirm attribute set to the given value.

https://htmx.org/attributes/hx-confirm/

func HxDelete

func HxDelete(path string) gomponents.Node

HxDelete returns a gomponents node with the hx-delete attribute set to the given path.

https://htmx.org/attributes/hx-delete/

func HxDisable

func HxDisable(value string) gomponents.Node

HxDisable returns a gomponents node with the hx-disable attribute set to the given value.

https://htmx.org/attributes/hx-disable/

func HxDisabledELT

func HxDisabledELT(value string) gomponents.Node

HxDisabledELT returns a gomponents node with the hx-disabled-elt attribute set to the given value.

https://htmx.org/attributes/hx-disabled-elt/

func HxDisinherit

func HxDisinherit(value string) gomponents.Node

HxDisinherit returns a gomponents node with the hx-disinherit attribute set to the given value.

https://htmx.org/attributes/hx-disinherit/

func HxEncoding

func HxEncoding(value string) gomponents.Node

HxEncoding returns a gomponents node with the hx-encoding attribute set to the given value.

https://htmx.org/attributes/hx-encoding/

func HxExt

func HxExt(value string) gomponents.Node

HxExt returns a gomponents node with the hx-ext attribute set to the given value.

https://htmx.org/attributes/hx-ext/

func HxGet

func HxGet(path string) gomponents.Node

HxGet returns a gomponents node with the hx-get attribute set to the given path.

https://htmx.org/attributes/hx-get/

func HxHeaders

func HxHeaders(value string) gomponents.Node

HxHeaders returns a gomponents node with the hx-headers attribute set to the given value.

https://htmx.org/attributes/hx-headers/

func HxHistory

func HxHistory(value string) gomponents.Node

HxHistory returns a gomponents node with the hx-history attribute set to the given value.

https://htmx.org/attributes/hx-history/

func HxHistoryElt

func HxHistoryElt(value string) gomponents.Node

HxHistoryElt returns a gomponents node with the hx-history-elt attribute set to the given value.

https://htmx.org/attributes/hx-history-elt/

func HxInclude

func HxInclude(value string) gomponents.Node

HxInclude returns a gomponents node with the hx-include attribute set to the given value.

https://htmx.org/attributes/hx-include/

func HxIndicator

func HxIndicator(value string) gomponents.Node

HxIndicator returns a gomponents node with the hx-indicator attribute set to the given value.

https://htmx.org/attributes/hx-indicator/

func HxOn

func HxOn(name string, value string) gomponents.Node

HxOn returns a gomponents node with the hx-on:name="value" attribute set to the given value.

https://htmx.org/attributes/hx-on/

func HxParams

func HxParams(value string) gomponents.Node

HxParams returns a gomponents node with the hx-params attribute set to the given value.

https://htmx.org/attributes/hx-params/

func HxPatch

func HxPatch(path string) gomponents.Node

HxPatch returns a gomponents node with the hx-patch attribute set to the given path.

https://htmx.org/attributes/hx-patch/

func HxPost

func HxPost(path string) gomponents.Node

HxPost returns a gomponents node with the hx-post attribute set to the given path.

https://htmx.org/attributes/hx-post/

func HxPreserve

func HxPreserve(value string) gomponents.Node

HxPreserve returns a gomponents node with the hx-preserve attribute set to the given value.

https://htmx.org/attributes/hx-preserve/

func HxPrompt

func HxPrompt(value string) gomponents.Node

HxPrompt returns a gomponents node with the hx-prompt attribute set to the given value.

https://htmx.org/attributes/hx-prompt/

func HxPushURL

func HxPushURL(value string) gomponents.Node

HxPushURL returns a gomponents node with the hx-push-url attribute set to the given value.

https://htmx.org/attributes/hx-push-url/

func HxPut

func HxPut(path string) gomponents.Node

HxPut returns a gomponents node with the hx-put attribute set to the given path.

https://htmx.org/attributes/hx-put/

func HxReplaceURL

func HxReplaceURL(value string) gomponents.Node

HxReplaceURL returns a gomponents node with the hx-replace-url attribute set to the given value.

https://htmx.org/attributes/hx-replace-url/

func HxRequest

func HxRequest(value string) gomponents.Node

HxRequest returns a gomponents node with the hx-request attribute set to the given value.

https://htmx.org/attributes/hx-request/

func HxSelect

func HxSelect(value string) gomponents.Node

HxSelect returns a gomponents node with the hx-select attribute set to the given value.

https://htmx.org/attributes/hx-select/

func HxSelectOOB

func HxSelectOOB(value string) gomponents.Node

HxSelectOOB returns a gomponents node with the hx-select-oob attribute set to the given value.

https://htmx.org/attributes/hx-select-oob/

func HxSwap

func HxSwap(value string) gomponents.Node

HxSwap returns a gomponents node with the hx-swap attribute set to the given value.

https://htmx.org/attributes/hx-swap/

func HxSwapOOB

func HxSwapOOB(value string) gomponents.Node

HxSwapOOB returns a gomponents node with the hx-swap-oob attribute set to the given value.

https://htmx.org/attributes/hx-swap-oob/

func HxSync

func HxSync(value string) gomponents.Node

HxSync returns a gomponents node with the hx-sync attribute set to the given value.

https://htmx.org/attributes/hx-sync/

func HxTarget

func HxTarget(value string) gomponents.Node

HxTarget returns a gomponents node with the hx-target attribute set to the given value.

https://htmx.org/attributes/hx-target/

func HxTrigger

func HxTrigger(value string) gomponents.Node

HxTrigger returns a gomponents node with the hx-trigger attribute set to the given value.

https://htmx.org/attributes/hx-trigger/

func HxValidate

func HxValidate(value string) gomponents.Node

HxValidate returns a gomponents node with the hx-validate attribute set to the given value.

https://htmx.org/attributes/hx-validate/

func HxVals

func HxVals(value string) gomponents.Node

HxVals returns a gomponents node with the hx-vals attribute set to the given value.

https://htmx.org/attributes/hx-vals/

func RespondAlert

func RespondAlert(c echo.Context, message string) error

RespondAlert shows an alert.

func RespondAlertWithRedirect

func RespondAlertWithRedirect(c echo.Context, message, url string) error

RespondAlertWithRedirect shows an alert and redirects the page using JS.

func RespondAlertWithRefresh

func RespondAlertWithRefresh(c echo.Context, message string) error

RespondAlertWithRefresh shows an alert and refreshes the page using HTMX.

func RespondRedirect

func RespondRedirect(c echo.Context, url string) error

RespondRedirect redirects the user to the given URL using HTMX.

func RespondRefresh

func RespondRefresh(c echo.Context) error

RespondRefresh refreshes the page using HTMX.

func RespondToastError

func RespondToastError(c echo.Context, message string) error

RespondToastError reswaps the HTMX to none and shows an error message inside a toast.

func RespondToastErrorInfinite

func RespondToastErrorInfinite(c echo.Context, message string) error

RespondToastErrorInfinite reswaps the HTMX to none and shows an error message inside an infinite toast.

func RespondToastSuccess

func RespondToastSuccess(c echo.Context, message string) error

RespondToastSuccess reswaps the HTMX to none and shows an success message inside a toast.

func RespondToastSuccessInfinite

func RespondToastSuccessInfinite(c echo.Context, message string) error

RespondToastSuccessInfinite reswaps the HTMX to none and shows an success message inside an infinite toast.

func ServerGetCurrentURL

func ServerGetCurrentURL(c echo.Context) string

ServerGetCurrentURL of the browser.

func ServerGetPrompt

func ServerGetPrompt(c echo.Context) string

ServerGetPrompt from the user response to an hx-prompt. See https://htmx.org/attributes/hx-prompt

func ServerGetTarget

func ServerGetTarget(c echo.Context) string

ServerGetTarget returns the id of the target element if it exists.

func ServerGetTrigger

func ServerGetTrigger(c echo.Context) string

ServerGetTrigger returns the id of the triggered element if it exists.

func ServerGetTriggerName

func ServerGetTriggerName(c echo.Context) string

ServerGetTriggerName returns the name of the triggered element if it exists.

func ServerIsBoosted

func ServerIsBoosted(c echo.Context) bool

ServerIsBoosted indicates that the request is via an element using hx-boost.

func ServerIsHistoryRestoreRequest

func ServerIsHistoryRestoreRequest(c echo.Context) bool

ServerIsHistoryRestoreRequest returns whether the request is for history restoration after a miss in the local history cache.

func ServerIsRequest

func ServerIsRequest(c echo.Context) bool

ServerIsRequest returns whether this is a HTMX request.

func ServerSetLocation

func ServerSetLocation(c echo.Context, v string)

ServerSetLocation allows you to do a client-side redirect that does not do a full page reload. See https://htmx.org/headers/hx-location

func ServerSetPushURL

func ServerSetPushURL(c echo.Context, v string)

ServerSetPushURL pushes a new URL into the history stack. See https://htmx.org/headers/hx-push-url

func ServerSetRedirect

func ServerSetRedirect(c echo.Context, v string)

ServerSetRedirect can be used to do a client-side redirect to a new location.

func ServerSetRefresh

func ServerSetRefresh(c echo.Context)

ServerSetRefresh will make the client side do a a full refresh of the page.

func ServerSetReplaceURL

func ServerSetReplaceURL(c echo.Context, v string)

ServerSetReplaceURL replaces the current URL in the location bar. See https://htmx.org/headers/hx-replace-url

func ServerSetReswap

func ServerSetReswap(c echo.Context, v string)

ServerSetReswap allows you to specify how the response will be swapped. See https://htmx.org/attributes/hx-swap

func ServerSetRetarget

func ServerSetRetarget(c echo.Context, v string)

ServerSetRetarget sets a CSS selector that updates the target of the content update to a different element on the page.

func ServerSetTrigger

func ServerSetTrigger(c echo.Context, v string)

ServerSetTrigger allows you to trigger client side events. See https://htmx.org/headers/hx-trigger

func ServerSetTriggerAfterSettle

func ServerSetTriggerAfterSettle(c echo.Context, v string)

ServerSetTriggerAfterSettle allows you to trigger client side events. See https://htmx.org/headers/hx-trigger

func ServerSetTriggerAfterSwap

func ServerSetTriggerAfterSwap(c echo.Context, v string)

ServerSetTriggerAfterSwap allows you to trigger client side events. See https://htmx.org/headers/hx-trigger

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL