Expand description
This crate provides a collection of HTMX attributes for fun-html
§Example
use fun_html::{elt::{script_empty, button, text}, attr::src};
use fun_htmx::{hx_get, hx_swap_outer_html};
let quick_start = [
script_empty([src("https://unpkg.com/htmx.org@2.0.3")]),
button(
[hx_get("/clicked"), hx_swap_outer_html()],
text("Click Me")
),
];§Feature flags
std: enabled by default. must be disabled to compile tono_stdserde_json: Add utilities likehx_vals_serde(values: &impl Serialize)that relies onserdeserialization to output json
Functions§
- hx_
boost hx-boostattribute- hx_
confirm hx-confirmattribute- hx_
delete hx-deleteattribute- hx_
disinherit hx-disinheritattribute- hx_
disinherit_ all hx-disinherit="*"- hx_get
hx-getattribute- hx_on
hx-on*attributes- hx_
on_ htmx_ after_ request hx-on:htmx:after-requestattribute- hx_
on_ htmx_ before_ request hx-on:htmx:before-requestattribute- hx_
patch hx-patchattribute- hx_post
hx-postattribute- hx_
push_ url hx-push-urlattribute using a boolean- hx_
push_ url_ str hx-push-urlattribute using an URL- hx_put
hx-putattribute- hx_
select hx-selectattribute- hx_swap
hx-swapattribute- hx_
swap_ after_ begin hx-swap="afterbegin"- hx_
swap_ after_ end hx-swap="afterend"- hx_
swap_ before_ begin hx-swap="beforebegin"- hx_
swap_ before_ end hx-swap="beforeend"- hx_
swap_ delete hx-swap="delete"- hx_
swap_ inner_ html hx-swap="innerHTML"- hx_
swap_ none hx-swap="none"- hx_
swap_ oob - `hx-swap-oob=“true”
- hx_
swap_ oob_ swap hx-swap-oobattribute- hx_
swap_ outer_ html hx-swap="outerHTML"- hx_
swap_ text_ content hx-swap="textContent"- hx_
target hx-targetattribute- hx_
trigger hx-triggerattribute- hx_vals
hx-valsattribute- hx_
vals_ serde serde_json hx-valsattribute usingserdeSerialization