ghtmx example ยท htmx 4

Explicit inheritance

htmx 4 inherits nothing by default. The panel below declares its swap target and its included field once with :inherited; the nested group extends the included fields with :inherited:append; the buttons carry only their bound hx-post.

hx-target:inherited="#out" hx-include:inherited="#team"

hx-include:inherited:append="#role"

Outside the panel nothing is inherited, so this button names its own target and includes nothing:

Press a button: the handler echoes the fields it received.