Skip to main content
Add hx-* attributes to markup, return a rendered partial from the route, and HTMX swaps the result into the page.

Cross-element updates

Use the HX-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

Native alert(), confirm() and prompt() are a feather check error. Use the components above instead — they are styled, dark-mode aware and testable.

Partials live in their own directory

HTMX response fragments belong in templates/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.