-
Notifications
You must be signed in to change notification settings - Fork 30
/
index.html
466 lines (450 loc) · 16.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
<!DOCTYPE html>
<html lang="en">
<head>
<title>htmx extensions</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<style>
body {
font-family: Verdana, sans-serif;
max-width: 768px;
margin: auto;
padding: 4px 4px;
background-color: var(--bgColor);
color: var(--textColor);
}
.blue {
color: #3d72d7
}
.slash {
position: relative;
padding: 8px;
font-size: 1.2em;
top: 14px;
}
h1 {
font-family: Helvetica, sans-serif;
font-size: 5em;
text-align: center;
margin: 0;
}
h2 {
font-size: 2em;
text-align: center;
margin: 0;
}
input[type=search] {
width: 100%;
padding: 12px;
border-radius: 4px;
margin-bottom: 12px;
background-color: var(--bgColor);
color: var(--textColor);
border-color: var(--textColor);
}
main {
padding: 16px;
margin: 16px;
}
p {
margin: 16px;
line-height: 1.8em;
}
details {
margin: 16px;
line-height: 1.8em;
}
tr td {
padding: 12px;
line-height: 1.8em;
}
a {
color: var(--linkColor);
}
a:hover {
opacity: 0.6;
}
:root {
--bgColor: #ffffff;
--textColor: #1f1f1f;
--linkColor: #3366cc;
}
@media (prefers-color-scheme: dark) {
:root {
--bgColor: #1f1f1f;
--textColor: #ffffff;
--linkColor: #5b96d5;
}
}
</style>
<script src="_hyperscript.min.js"></script>
</head>
<body>
<main>
<h1><<span class="blue slash">/</span>> htm<span class="blue">x</span></span></span></h1>
<h2>extensions</h2>
<p>
This site is a searchable collection of extensions for <a href="https://htmx.org">htmx 2.0</a>. They are not
guaranteed to work with the htmx 1.x codebase.
</p>
<p>
<a href="#core">Core</a> extensions are actively maintained by the htmx team.
</p>
<p>
<a href="#community">Community</a> extensions are contributed by the community or rarely touched by the htmx
team (although they still work!)
</p>
<details>
<summary><b>Contributing</b></summary>
If you'd like to add your extension to this website, add a row to the table below in a PR against the
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/dev/www/index.html"><code>/www/index.html</code></a>
file.
</details>
<h3 id="core"><a href="#core">Core</a></h3>
<input placeholder="search core extensions"
type="search"
_="on input
show <tbody tr/> in the next <table/> when its innerText.toLowerCase() contains my value.toLowerCase()">
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/sse/README.md">
sse
</a>
</td>
<td>
Provides support for
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events">Server
Sent Events</a>
directly from HTML.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/ws/README.md">
ws
</a>
</td>
<td>
Provides bi-directional communication with
<a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_client_applications">Web
Sockets</a>
servers directly from HTML
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/head-support/README.md">
head-support
</a>
</td>
<td>
Provides support for merging head tag information (styles, etc.) in htmx requests
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/idiomorph/blob/main/README.md#htmx">
idiomorph
</a>
</td>
<td>
Provides a <code>morph</code> swap strategy based on the <a
href="https://github.com/bigskysoftware/idiomorph/">idiomorph</a>
morphing library, which was created by the htmx team.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/htmx-1-compat/README.md">
htmx-1-compat
</a>
</td>
<td>
Rolls back most of the behavioral changes of htmx 2 to the htmx 1 defaults.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/preload/README.md">
preload
</a>
</td>
<td>
This extension allows you to load HTML fragments into your browser's cache before they are requested by
the user, so that additional pages appear to users to load nearly instantaneously.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/response-targets/README.md">
response-targets
</a>
</td>
<td>
This extension allows you to specify different target elements to be swapped when
different HTTP response codes are received.
</td>
</tr>
</tbody>
</table>
<h3 id="community"><a href="#community">Community</a></h3>
<input placeholder="search community extensions"
type="search"
_="on input
show <tbody tr/> in the next <table/> when its innerText.toLowerCase() contains my value.toLowerCase()">
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/ajax-header/README.md">
ajax-header
</a>
</td>
<td>
Adds an <code>X-Requested-With</code> header to all requests made by htmx
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/alpine-morph/README.md">
alpine-morph
</a>
</td>
<td>
Alpine.js now has a lightweight <a href="https://alpinejs.dev/plugins/morph">morph plugin]</a> and this extension
allows you to use it as the swapping mechanism in htmx which is necessary to retain Alpine state when you have entire Alpine components swapped by htmx.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/class-tools/README.md">
class-tools
</a>
</td>
<td>
The `class-tools` extension allows you to specify CSS classes that will be swapped onto or off of the elements by using
a `classes` or `data-classes` attribute.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/client-side-templates/README.md">
client-side-templates
</a>
</td>
<td>
This extension supports transforming a JSON/XML request response into HTML via a client-side template before it is
swapped into the DOM.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/debug/README.md">
debug
</a>
</td>
<td>
This extension includes log all htmx events for the element it is on, either through the `console.debug` function
or through the `console.log` function with a `DEBUG:` prefix.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/disable-element/README.md">
disable-element
</a>
</td>
<td>
This extension disables an element during an htmx request, when configured on the element triggering the
request. Note that this functionality is now part of the core of htmx via the <code>hx-disabled-elt</code>
attribute
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/event-header/README.md">
event-header
</a>
</td>
<td>
This extension adds the `Triggering-Event` header to requests. The value of
the header is a JSON serialized version of the event that triggered the
request.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/include-vals/README.md">
include-vals
</a>
</td>
<td>
The `include-vals` extension allows you to programmatically include values in a request with
a `include-vals` attribute. The value of this attribute is one or more name/value pairs, which
will be evaluated as the fields in a javascript object literal.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/json-enc/README.md">
json-enc
</a>
</td>
<td>
This extension encodes parameters in JSON format instead of url format.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/Emtyloc/json-enc-custom/blob/main/README.md">
json-enc-custom
</a>
</td>
<td>
This extension works similarly to json-enc but allows for very complex structures, such as embedding JSON objects, lists, or handling indexes, just by using the name attribute.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/loading-states/README.md">
loading-states
</a>
</td>
<td>
This extension allows you to easily manage loading states while a request is in flight, including
disabling elements, and adding and removing CSS classes.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/morphdom-swap/README.md">
morphdom-swap
</a>
</td>
<td>
Provides a <code>morph</code> swap strategy based on the <a
href="https://github.com/patrick-steele-idem/morphdom/">morphdom</a> morphing library.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/multi-swap/README.md">
multi-swap
</a>
</td>
<td>
This extension allows you to swap multiple elements marked from the HTML response. You can also choose for
each element which swap method should be used.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/craigharman/htmx-ext-no-cache/README.md">
no-cache
</a>
</td>
<td>
This extension forces HTMX to bypass client caches and make a new request. An `hx-no-cache` header is also added to allow server-side caching to be bypassed.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/path-deps/README.md">
path-deps
</a>
</td>
<td>
This extension supports expressing inter-element dependencies based on paths, inspired by the
<a href="http://intercoolerjs.org/docs.html#dependencies">intercooler.js dependencies mechanism</a>.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/path-params/README.md">
path-params
</a>
</td>
<td>
This extension uses request parameters to populate path variables. Used parameters are removed so they
won't be sent in the query string or body anymore.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/remove-me/README.md">
remove-me
</a>
</td>
<td>
Allows you to remove an element after a specified interval.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/fanelfaa/htmx-ext-replace-params/blob/main/README.md">
replace-params
</a>
</td>
<td>
This extension uses request parameters to replace existing parameters. If given value is empty string then parameter will be deleted. This extension would be usefull in situations like pagination, search that you only want to replace only few parameters instead of reset all parameters.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/bigskysoftware/htmx-extensions/blob/main/src/restored/README.md">
restored
</a>
</td>
<td>
Triggers an event whenever a back button even is detected while using <code>hx-boost</code>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/MichaelWest22/htmx-extensions/blob/main/src/safe-nonce/README.md">
safe-nonce
</a>
</td>
<td>
The `safe-nonce` extension can be used to improve the security of the application/web-site and help avoid XSS issues by allowing you to return known trusted inline scripts safely
</td>
</tr>
<tr>
<td>
The `safe-nonce` extension can be used to improve the security of the application/web-site and help avoid XSS issues by allowing you to return known trusted inline scripts safely
<a href="https://github.com/benopotamus/htmx-ext-shoelace/blob/main/README.md">
Shoelace
</a>
</td>
<td>
Makes <a href="https://shoelace.style/">Shoelace</a> elements work seamlessly (as possible) with htmx.
</td>
</tr>
<tr>
<td>
<a href="https://github.com/Renerick/htmx-signalr/blob/master/README.md">
signalr
</a>
</td>
<td>
Provides bidirectional real-time communication via <a
href="https://github.com/dotnet/AspNetCore/tree/main/src/SignalR">SignalR</a>.
</td>
</tr>
</tbody>
</table>
</main>
</body>