Skip to content

Commit 46badfe

Browse files
Add descriptions for attribute pages (#3158)
Descriptions for attribute pages
1 parent 6dbf554 commit 46badfe

35 files changed

+112
-8
lines changed

www/content/attributes/hx-boost.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
+++
22
title = "hx-boost"
3+
description = """\
4+
The hx-boost attribute in htmx enables progressive enhancement by converting standard HTML anchors and forms into \
5+
AJAX requests, maintaining graceful fallback for users without JavaScript while providing modern dynamic page \
6+
updates for those with JavaScript enabled."""
37
+++
48

59
The `hx-boost` attribute allows you to "boost" normal anchors and form tags to use AJAX instead. This

www/content/attributes/hx-confirm.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
+++
22
title = "hx-confirm"
3+
description = """\
4+
The hx-confirm attribute in htmx provides a way to add confirmation dialogs before executing requests, allowing \
5+
you to protect users from accidental destructive actions. This documentation explains how to implement confirmation \
6+
prompts and customize their behavior through event handling."""
37
+++
48

59
The `hx-confirm` attribute allows you to confirm an action before issuing a request. This can be useful

www/content/attributes/hx-delete.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
+++
22
title = "hx-delete"
3+
description = """\
4+
The hx-delete attribute in htmx will cause an element to issue a DELETE request to the specified URL and swap the \
5+
returned HTML into the DOM using a swap strategy."""
36
+++
47

58
The `hx-delete` attribute will cause an element to issue a `DELETE` to the specified URL and swap

www/content/attributes/hx-disable.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
+++
22
title = "hx-disable"
3+
description = "The hx-disable attribute in htmx will disable htmx processing for a given element and all its children."
34
+++
45

56
The `hx-disable` attribute will disable htmx processing for a given element and all its children. This can be

www/content/attributes/hx-disabled-elt.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
+++
22
title = "hx-disabled-elt"
3+
description = """\
4+
The hx-disabled-elt attribute in htmx allows you to specify elements that will have the `disabled` attribute added \
5+
to them for the duration of the request."""
36
+++
47

58
The `hx-disabled-elt` attribute allows you to specify elements that will have the `disabled` attribute
@@ -16,7 +19,7 @@ added to them for the duration of the request. The value of this attribute can b
1619
(e.g. `next button` will disable the closest following sibling `button` element)
1720
* `previous` which resolves to [element.previousElementSibling](https://developer.mozilla.org/docs/Web/API/Element/previousElementSibling)
1821
* `previous <CSS selector>` which will scan the DOM backwards for the first element that matches the given CSS selector.
19-
(e.g `previous input` will disable the closest previous sibling `input` element)
22+
(e.g. `previous input` will disable the closest previous sibling `input` element)
2023

2124
Here is an example with a button that will disable itself during a request:
2225

www/content/attributes/hx-disinherit.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
+++
22
title = "hx-disinherit"
3+
description = """\
4+
The hx-disinherit attribute in htmx lets you control how child elements inherit attributes from their parents. This \
5+
documentation explains how to selectively disable inheritance of specific htmx attributes or all attributes, \
6+
allowing for more granular control over your web application's behavior."""
37
+++
48

59
The default behavior for htmx is to "inherit" many attributes automatically: that is, an attribute such as

www/content/attributes/hx-encoding.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
+++
22
title = "hx-encoding"
3+
description = """\
4+
The hx-encoding attribute in htmx allows you to switch the request encoding from the usual \
5+
`application/x-www-form-urlencoded` encoding to `multipart/form-data`, usually to support file uploads in an AJAX \
6+
request."""
37
+++
48

59
The `hx-encoding` attribute allows you to switch the request encoding from the usual `application/x-www-form-urlencoded`

www/content/attributes/hx-ext.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
+++
22
title = "hx-ext"
3+
description = """\
4+
The hx-ext attribute in htmx enables one or more htmx extensions for an element and all its children. You can also \
5+
use this attribute to ignore an extension that is enabled by a parent element."""
36
+++
47

58
The `hx-ext` attribute enables an htmx [extension](https://htmx.org/extensions) for an element and all its children.

www/content/attributes/hx-get.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
+++
22
title = "hx-get"
3+
description = """\
4+
The hx-get attribute in htmx will cause an element to issue a GET request to the specified URL and swap the returned \
5+
HTML into the DOM using a swap strategy."""
36
+++
47

58
The `hx-get` attribute will cause an element to issue a `GET` to the specified URL and swap

www/content/attributes/hx-headers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
+++
22
title = "hx-headers"
3+
description = """\
4+
The hx-headers attribute in htmx allows you to add to the headers that will be submitted with an AJAX request."""
35
+++
46

57
The `hx-headers` attribute allows you to add to the headers that will be submitted with an AJAX request.

0 commit comments

Comments
 (0)