The morphdom-swap Extension

This extension allows you to use the morphdom library as the swapping mechanism in htmx.

The morphdom library does not support morph element to multiple elements. If the result of hx-select is more than one element, it will pick the first one.


<script src=""></script>


  <script src="lib/morphdom-umd.js"></script> <!-- include the morphdom library -->
<body hx-ext="morphdom-swap">
   <button hx-swap="morphdom">This button will be swapped with morphdom!</button>