htmx 4.0 is under construction — migration guide

htmx.config.morphScanLimit

Maximum number of siblings scanned when matching elements during morphing

The htmx.config.morphScanLimit option limits how many sibling elements htmx will scan when trying to match nodes during a morph swap. Higher values improve accuracy for long lists without IDs at the cost of performance.

Default: 10

Example

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

If morphing produces unexpected reorders in long lists, try increasing this limit.

See also: htmx.config