htmx 4.0 is under construction — migration guide

htmx.config.metaCharacter

Custom character used instead of `:` for attribute modifiers

The htmx.config.metaCharacter option allows you to replace the : character used in attribute modifiers (e.g., hx-get:inherited) with a custom character of your choice.

Default: undefined (uses :)

Example

htmx.config.metaCharacter = "-";
<meta name="htmx-config" content='{"metaCharacter":"-"}'>

With the above setting, you would write hx-get-inherited instead of hx-get:inherited. This can help avoid conflicts with templating engines or parsers that treat : specially.

See also: htmx.config