| 1 | --- |
| 2 | title: "htmx.config.morphScanLimit" |
| 3 | description: "Maximum number of siblings scanned when matching elements during morphing" |
| 4 | --- |
| 5 | |
| 6 | 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. |
| 7 | |
| 8 | **Default:** `10` |
| 9 | |
| 10 | ## Example |
| 11 | |
| 12 | ```javascript |
| 13 | htmx.config.morphScanLimit = 20; |
| 14 | ``` |
| 15 | |
| 16 | ```html |
| 17 | <meta name="htmx-config" content='{"morphScanLimit":20}'> |
| 18 | ``` |
| 19 | |
| 20 | If morphing produces unexpected reorders in long lists, try increasing this limit. |
| 21 | |
| 22 | See also: [`htmx.config`](/reference/config/htmx-config) |