The htmx.config.morphScanLimit option limits siblings scanned during morph matching.

Higher values improve accuracy for long lists without IDs at a performance cost.

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