htmx 4.0 is under construction — migration guide

htmx.config.prefix

Set a custom attribute prefix

The htmx.config.prefix option allows you to use a custom prefix for htmx attributes instead of hx-.

Default: "" (no prefix, use hx-)

Example

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

Now you can use data-hx-get instead of hx-get, etc.