diff --git a/www/content/extensions/idiomorph.md b/www/content/extensions/idiomorph.md index c095ea720..e00752045 100644 --- a/www/content/extensions/idiomorph.md +++ b/www/content/extensions/idiomorph.md @@ -2,43 +2,47 @@ title = "htmx Idiomorph Extension" +++ -[Idiomorph](https://github.com/bigskysoftware/idiomorph) is a DOM morphing algorithm created by the htmx creator. DOM +[Idiomorph](https://github.com/bigskysoftware/idiomorph) is a DOM morphing algorithm created by the htmx creator. DOM morphing is a process where an existing DOM tree is "morphed" into the shape of another in a way that resuses as much of -the existing DOM's nodes as possible. By preserving nodes when changing from one tree to another you can present a +the existing DOM's nodes as possible. By preserving nodes when changing from one tree to another you can present a much smoother transition between the two states. -You can use the idiomorph morphing algorithm as a [swapping](@attributes/hx-swap) strategy by including the idiomorph +You can use the idiomorph morphing algorithm as a [swapping](@attributes/hx-swap) strategy by including the idiomorph extension. ## Installing The fastest way to install `idiomorph` is to load it via a CDN. Remember to always include the core htmx library before the extension and [enable the extension](#usage). + ```HTML - ``` -Unminified versions are also available at: -https://unpkg.com/idiomorph/dist/idiomorph.js -https://unpkg.com/idiomorph/dist/idiomorph-ext.js -While the CDN approach is simple, you may want to consider [not using CDNs in production](https://blog.wesleyac.com/posts/why-not-javascript-cdn). The next easiest way to install `idiomorph` is to simply copy it into your project. Download idiomorph and its htmx extension from `https://unpkg.com/idiomorph` and `https://unpkg.com/idiomorph/dist/idiomorph-ext.min.js`, add them to the appropriate directory in your project and include them where necessary with `