diff --git a/www/content/extensions/idiomorph.md b/www/content/extensions/idiomorph.md index ef563093d..f06301ca8 100644 --- a/www/content/extensions/idiomorph.md +++ b/www/content/extensions/idiomorph.md @@ -10,19 +10,31 @@ 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 extension. -## Install +## Installation -From CDN with a script tag: -```html - +The fastest way to install `idiomorph` is to load it via a CDN. Remember to always include the core htmx library before the extension. +```HTML +
+ + + ``` +An unminified version is also available at https://unpkg.com/idiomorph/dist/idiomorph.js. -From npm using a bundler (e.g. Rollup, Webpack): -``` -npm i idiomorph +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 the extension from `https://unpkg.com/idiomorph`, add it to the appropriate directory in your project and include it where necessary with a `