.. _dependencies: Dependencies ============ .. _dependencies-htmx: htmx ---- `htmx `_ is a client side javascript library for creating interactive web- pages. It is based on sending asynchronous (AJAX) requests to a server to rerender parts of the current html document on certain triggers, and swapping out just that part of the DOM. htmx is configured through attributes on html elements. For example, consider the following html snippet:: with htmx, clicking this button will send a post request to ``/clicked``. It will then replace the element with id ``parent-div`` with whatever (partial) html content is returned. It will swap out the whole ``#parent-div`` element (indicated by ``hx-swap="outerHTML"``. If ``hx-swap`` was omitted it would swap out just the inner contents of the ``#parent-div`` element. As you can see, htmx doe not perform any html rendering itself, all it does swap out content. There are however, many ways how htmx can swap out content. While going over the details of how htmx works is beyond the scope of this documentation, some use cases and examples are given below. Include form fields ################### By default htmx will include the name and value of any form input field as to the request, if the htmx element that triggers the request is inside a ``
``. This includes ``hidden`` form fields and ``