Skip to content

Drupal HTMX

I need to... Guide
Understand what HTMX is and why Drupal adopted it HTMX Overview
Decide between HTMX and traditional AJAX HTMX vs AJAX
Understand the request/response lifecycle Request/Response Lifecycle
Enable HTMX in my module with routes and controllers Basic Setup
Understand what core/drupal.htmx loads Library Dependencies
Detect HTMX requests and access request metadata Request Detection
Build forms with cascading selects or dependent fields Dynamic Forms
Build HTMX-enabled controllers HTMX Controllers
Configure HTMX attributes on elements HTMX Attributes Reference
Set HTMX response headers (redirect, trigger, retarget) Response Headers
Run Drupal behaviors on HTMX-loaded content Drupal Behaviors Integration
Understand differential CSS/JS loading Asset Loading
Implement load more, infinite scroll, polling, live search Production Patterns
See a complete production HTMX implementation Production Example: ConfigSingleExportForm
Follow security, performance, and accessibility standards Best Practices
Debug HTMX issues Troubleshooting
Migrate from AJAX to HTMX AJAX Migration
Find Drupal core HTMX implementation files Core File Reference