# htmx.config.morphIgnore

The `htmx.config.morphIgnore` option is an array of attribute name prefixes to preserve when morphing DOM elements. An attribute is ignored if its name starts with any entry in the array.

**Default:** `["data-htmx-powered"]`

## Example

```javascript
htmx.config.morphIgnore = ["data-htmx-powered", "data-analytics"];
```

```html
<meta name="htmx-config" content='{"morphIgnore":["data-htmx-powered","data-analytics"]}'>
```

With `"data-"` in the list, all `data-*` attributes are preserved during morph — the server response cannot overwrite them. Exact attribute names also work since a string starts with itself (e.g. `"style"` matches only the `style` attribute).

## Use cases

- Preserve client-side state stored in `data-*` attributes (e.g. from the [`hx-live`](https://four.htmx.org/extensions/hx-live) `data` proxy)
- Prevent CSP violations from inline `style` attribute copying (add `"style"`)
- Protect framework-managed attributes from being overwritten during morph

## See also

- [`morphSkip`](https://four.htmx.org/reference/config/htmx-config-morphSkip) — CSS selector for elements to completely skip during morph
- [`morphSkipChildren`](https://four.htmx.org/reference/config/htmx-config-morphSkipChildren) — CSS selector for elements whose children are preserved