A minimal Symfony application demonstrating the htmx-bundle features.
Note: This is a hobby project created for personal use and learning purposes. It is not maintained as an open-source project with active support.
Live Demo | htmx-bundle Documentation
cd demo
composer installcomposer start
# or
php -S localhost:8000 -t publicThen open http://localhost:8000 in your browser.
Navigate between pages without full page reloads using HtmxRequest and block rendering.
Asynchronous form submission with validation:
- Success: HTTP 200 with success message
- Validation errors: HTTP 422 with form errors
Demonstrates the htmx option on Symfony form fields:
- Live search / autocomplete with debouncing
- Inline field validation on blur
- Conditional fields based on selection
Session-based multi-step form with:
- Schema versioning for state migration
- Per-step validation with error indicators on tabs
- Configurable navigation strategies (free, sequential, linear)
- Smooth htmx transitions between steps
Demonstrates common list operations:
- Click to edit item names inline
- Delete with
hx-confirmconfirmation dialog - OOB notifications without custom JavaScript
Load more content automatically as you scroll using hx-trigger="revealed".
Auto-refresh content with hx-trigger="every 2s".
Interactive demo of all HtmxResponseBuilder methods.
Interactive demo of all HtmxRequest properties.
Global CSRF token injection using htmx_csrf_meta() and JavaScript event listener.
Endpoints restricted to htmx requests only with #[HtmxOnly] attribute.