Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/donseba/go-htmx
/ functions
Functions
228 in github.com/donseba/go-htmx
⨍
Functions
228
◇
Types & classes
42
↓ 51 callers
Method
String
()
sse/sse.go:20
↓ 40 callers
Function
equal
(t *testing.T, expected, actual string)
htmx_test.go:275
↓ 32 callers
Method
Get
(k HxResponseKey)
response.go:43
↓ 18 callers
Method
Set
(k HxResponseKey, val string)
response.go:39
↓ 16 callers
Function
NewSwap
NewSwap returns a new Swap
swap.go:58
↓ 15 callers
Method
NewHandler
NewHandler returns a new htmx handler.
htmx.go:49
↓ 14 callers
Method
Write
Write writes the data to the connection as part of an HTTP reply.
handler.go:47
↓ 13 callers
Function
equalBool
(t *testing.T, expected, actual bool)
htmx_test.go:269
↓ 12 callers
Method
Handle
(w http.ResponseWriter, r *http.Request, cl Listener)
sse/sse.go:26
↓ 12 callers
Method
ResponseHeader
ResponseHeader returns the value of the response header
handler.go:259
↓ 9 callers
Function
HxStrToBool
HxStrToBool converts a string to a boolean value.
htmx.go:109
↓ 9 callers
Method
SetData
(input map[string]any)
component.go:31
↓ 8 callers
Method
AddEvent
(event string)
trigger.go:33
↓ 8 callers
Function
HxBoolToStr
HxBoolToStr converts a boolean value to a string.
htmx.go:114
↓ 8 callers
Function
New
New returns a new htmx instance.
htmx.go:37
↓ 7 callers
Function
NewTrigger
NewTrigger returns a new Trigger set
trigger.go:19
↓ 7 callers
Method
Render
Render renders the given renderer with the given context and writes the output to the response writer
handler.go:264
↓ 6 callers
Method
String
String returns the string representation of the Trigger set
trigger.go:88
↓ 6 callers
Method
Wrap
(renderer RenderableComponent, target string)
component.go:28
↓ 6 callers
Method
WriteHeader
WriteHeader sets the HTTP response header with the provided status code.
handler.go:136
↓ 5 callers
Method
Header
Header returns the header map that will be sent by WriteHeader
handler.go:146
↓ 5 callers
Function
NewManager
NewManager initializes and returns a new Manager instance.
sse/sse.go:93
↓ 5 callers
Method
Send
(message Envelope)
sse/sse.go:25
↓ 5 callers
Method
addNotifyObject
(nt notificationType, message string, vars ...map[string]any)
trigger.go:67
↓ 5 callers
Method
notifyObject
(nt notificationType, message string, vars ...map[string]any)
trigger.go:128
↓ 4 callers
Method
AddEventDetailed
AddEventDetailed adds a trigger to the Trigger set
trigger.go:38
↓ 4 callers
Method
Chan
()
sse/sse.go:15
↓ 4 callers
Method
Location
Location can be used to trigger a client side redirection without reloading the whole page https://htmx.org/headers/hx-location/
handler.go:163
↓ 4 callers
Method
Render
(ctx context.Context)
component.go:27
↓ 4 callers
Method
SetURL
(url *url.URL)
component.go:37
↓ 4 callers
Method
Warn
(msg string, args ...any)
htmx.go:28
↓ 4 callers
Method
WriteHTML
WriteHTML is a helper that writes HTML data to the connection.
handler.go:52
↓ 4 callers
Method
WriteString
WriteString is a helper that writes string data to the connection.
handler.go:57
↓ 3 callers
Method
AddEventObject
AddEventObject adds a trigger to the Trigger set
trigger.go:45
↓ 3 callers
Function
NewMessage
NewMessage returns a new message instance.
sse/sse.go:59
↓ 3 callers
Method
ReSwap
ReSwap allows you to specify how the response will be swapped. See hx-swap for possible values https://htmx.org/attributes/hx-swap/
handler.go:197
↓ 3 callers
Method
Scroll
Scroll sets the scrolling behavior to scroll to the top or bottom
swap.go:86
↓ 3 callers
Method
ScrollTop
ScrollTop sets the scrolling behavior to scroll to the top of the target element
swap.go:91
↓ 3 callers
Method
Settle
Settle modifies the amount of time that htmx will wait after receiving a response to settle the content
swap.go:142
↓ 3 callers
Method
Show
Show sets the scrolling behavior to scroll to the top or bottom
swap.go:101
↓ 3 callers
Method
Trigger
Trigger triggers events as soon as the response is received. https://htmx.org/headers/hx-trigger/
handler.go:219
↓ 3 callers
Method
TriggerAfterSettle
TriggerAfterSettle trigger events after the settling step. https://htmx.org/headers/hx-trigger/
handler.go:231
↓ 3 callers
Method
TriggerAfterSwap
TriggerAfterSwap trigger events after the swap step. https://htmx.org/headers/hx-trigger/
handler.go:243
↓ 3 callers
Method
WithEvent
WithEvent sets the event name for the message.
sse/sse.go:79
↓ 3 callers
Method
add
add adds a trigger to the Trigger set
trigger.go:27
↓ 3 callers
Function
equalInt
(t *testing.T, expected, actual int)
htmx_test.go:281
↓ 3 callers
Function
mainContent
()
examples/tiktaktoe/tiktaktoe.go:131
↓ 2 callers
Method
ID
()
sse/sse.go:14
↓ 2 callers
Function
IsHxBoosted
IsHxBoosted returns true if the request is a htmx request and the request is boosted
htmx.go:93
↓ 2 callers
Method
IsHxBoosted
IsHxBoosted returns true if the request is a htmx request and the request is boosted
handler.go:31
↓ 2 callers
Function
IsHxHistoryRestoreRequest
IsHxHistoryRestoreRequest returns true if the request is a htmx request and the request is a history restore request
htmx.go:98
↓ 2 callers
Method
IsHxHistoryRestoreRequest
IsHxHistoryRestoreRequest returns true if the request is a htmx request and the request is a history restore request
handler.go:36
↓ 2 callers
Function
IsHxRequest
IsHxRequest returns true if the request is a htmx request.
htmx.go:88
↓ 2 callers
Method
IsHxRequest
IsHxRequest returns true if the request is a htmx request.
handler.go:26
↓ 2 callers
Function
NewClient
(id string)
sse/sse.go:41
↓ 2 callers
Method
PushURL
PushURL pushes a new url into the history stack. https://htmx.org/headers/hx-push-url/
handler.go:175
↓ 2 callers
Method
ReSwapWithObject
ReSwapWithObject allows you to specify how the response will be swapped. See hx-swap for possible values https://htmx.org/attributes/hx-swap/
handler.go:203
↓ 2 callers
Method
ReTarget
ReTarget a CSS selector that updates the target of the content update to a different element on the page
handler.go:208
↓ 2 callers
Method
Redirect
Redirect can be used to do a client-side redirect to a new location
handler.go:180
↓ 2 callers
Method
Refresh
Refresh if set to true the client side will do a full refresh of the page
handler.go:185
↓ 2 callers
Method
RenderPartial
RenderPartial returns true if the request is an HTMX request that is either boosted or a standard request, provided it is not a history restore reques
handler.go:42
↓ 2 callers
Method
ReplaceURL
ReplaceURL allows you to replace the current URL in the browser location history. https://htmx.org/headers/hx-replace-url/
handler.go:191
↓ 2 callers
Method
String
String returns the string representation of the Swap
swap.go:166
↓ 2 callers
Method
TriggerWithObject
TriggerWithObject triggers events as soon as the response is received. https://htmx.org/headers/hx-trigger/
handler.go:225
↓ 2 callers
Method
WriteJSON
WriteJSON is a helper that writes json data to the connection.
handler.go:62
↓ 2 callers
Function
checkWinner
(board [3][3]string)
examples/tiktaktoe/tiktaktoe.go:109
↓ 2 callers
Method
injectData
(input map[string]any)
component.go:41
↓ 2 callers
Function
mainContent
()
examples/render/main.go:69
↓ 2 callers
Function
placeFood
(game *SnakeGame)
examples/snake/game.go:47
↓ 2 callers
Method
setScrolling
setScrolling sets the scrolling behavior
swap.go:71
↓ 2 callers
Method
setTiming
setTiming modifies the amount of time that htmx will wait after receiving a response to swap or settle the content
swap.go:116
↓ 1 callers
Method
Add
(message Envelope)
sse/sse.go:31
↓ 1 callers
Method
AddSuccess
(message string, vars ...map[string]any)
trigger.go:51
↓ 1 callers
Method
Clients
()
sse/sse.go:27
↓ 1 callers
Method
FS
FS sets the filesystem to load templates from, this allows for embedding templates into the go binary.
component.go:76
↓ 1 callers
Method
FocusScroll
FocusScroll enables or disables the focus scroll behaviour
swap.go:160
↓ 1 callers
Method
HxHeader
(r *http.Request)
request.go:49
↓ 1 callers
Function
HxRequestHeaderFromRequest
(r *http.Request)
request.go:36
↓ 1 callers
Method
HxResponseHeader
(headers http.Header)
response.go:29
↓ 1 callers
Method
IgnoreTitle
IgnoreTitle enables or disables the Title
swap.go:154
↓ 1 callers
Method
ReSelect
ReSelect a CSS selector that allows you to choose which part of the response is used to be swapped in. Overrides an existing hx-select on the triggeri
handler.go:213
↓ 1 callers
Method
Request
Request returns the HxHeaders from the request
handler.go:254
↓ 1 callers
Method
ScrollBottom
ScrollBottom sets the scrolling behavior to scroll to the bottom of the target element
swap.go:96
↓ 1 callers
Method
ShowBottom
ShowBottom sets the scrolling behavior to scroll to the bottom of the target element
swap.go:111
↓ 1 callers
Method
ShowTop
ShowTop sets the scrolling behavior to scroll to the top of the target element
swap.go:106
↓ 1 callers
Method
StopPolling
StopPolling sets the response status to 286, which will stop htmx from polling
handler.go:141
↓ 1 callers
Method
Style
Style sets the style of the swap, default is innerHTML and can be changed in htmx.config.defaultSwapStyle
swap.go:65
↓ 1 callers
Method
Swap
Swap modifies the amount of time that htmx will wait after receiving a response to swap the content
swap.go:137
↓ 1 callers
Method
Transition
Transition enables or disables the transition see : https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
swap.go:148
↓ 1 callers
Method
TriggerAfterSettleWithObject
TriggerAfterSettleWithObject trigger events after the settling step. https://htmx.org/headers/hx-trigger/
handler.go:237
↓ 1 callers
Method
TriggerAfterSwapWithObject
TriggerAfterSwapWithObject trigger events after the swap step. https://htmx.org/headers/hx-trigger/
handler.go:249
↓ 1 callers
Method
TriggerError
(message string, vars ...map[string]any)
trigger.go:145
↓ 1 callers
Method
TriggerInfo
(message string, vars ...map[string]any)
trigger.go:137
↓ 1 callers
Method
TriggerSuccess
(message string, vars ...map[string]any)
trigger.go:133
↓ 1 callers
Method
TriggerWarning
(message string, vars ...map[string]any)
trigger.go:141
↓ 1 callers
Method
With
(r RenderableComponent, target string)
component.go:29
↓ 1 callers
Method
addPartial
(key string, value any)
component.go:43
↓ 1 callers
Method
addPartial
addPartial adds a partial to the component
component.go:317
↓ 1 callers
Method
data
()
component.go:40
↓ 1 callers
Function
generateCacheKey
Generate a hash of the function names to include in the cache key
component.go:337
next →
1–100 of 228, ranked by callers