Here's my thought on </> htmx ~ The client-side-templates Extension

Using templates with htmx requires the client-side-templates extension, and the template engine to be loaded in a <script> tag.

example htmx using templates.

<!DOCTYPE html>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
  <div hx-ext="client-side-templates">
    <button hx-get=""
      Click Me

    <p id="content">Start</p>

    <template id="foo">
      <p> {% raw %}{{userID}}{% endraw %} and {% raw %}{{id}}{% endraw %} and {% raw %}{{title}}{% endraw %} and {% raw %}{{completed}}{% endraw %}</p>

This post was a thought by Waylon Walker see all my thoughts at