hx-* attributes to markup, return a rendered partial from the route, and HTMX
swaps the result into the page.
Cross-element updates
Use theHX-Trigger response header to fire an event that other elements listen for.
This is how one action refreshes an unrelated part of the page.
Built-in modals
Partials live in their own directory
HTMX response fragments belong intemplates/partials/, separate from full page
templates in templates/pages/. A partial renders a fragment of HTML with no layout
wrapper, which is exactly what HTMX expects to swap in.