htmx icon indicating copy to clipboard operation
htmx copied to clipboard

htmx-config meta tag not working in htmx4

Open HALtheWise opened this issue 1 month ago • 1 comments

It appears that the <meta name="htmx-config" content='{"defaultSwapStyle":"outerHTML"}'> element (as pulled from the docs) does nothing in HTMX 4.0.0-alpha4. It should either be implemented or documented as removed.

HALtheWise avatar Dec 03 '25 03:12 HALtheWise

The current meta name is actually htmx:config in htmx4. looks like the documentation needs updating but this is a work in progress during the alpha phase. the value of most of the config values is very different in htmx4 also sorry so having this as a breaking change will hopefully make it easier to upgrade. We also now support a simpler HCON format as well as JSON so you can now do:

<meta name="htmx:config" content="defaultSwap:outerHTML transitions:false">

HCON is the same format used for all htmx modifiers and configs internally

MichaelWest22 avatar Dec 04 '25 00:12 MichaelWest22