What problem does it solve?
This Skill eliminates the common pitfalls of integrating HTMX with Litestar applications, including misconfigured plugins, incorrect full-page responses to HTMX requests, missing CSRF protection, and unoptimized partial HTML rendering.
Core Features & Use Cases
- Litestar-native HTMX integration: Provides correct usage of Litestar's first-party
HTMXPlugin, HTMXRequest, and server-driven response objects like TriggerEvent and Reswap.
- Partial HTML workflow best practices: Teaches how to build Jinja2 partials for HTMX targets, implement out-of-band swaps for multi-region updates, and avoid XSS risks from string-concatenated HTML.
- Use case: For example, build an item management page where submitting a new item via HTMX returns an updated partial list and triggers a client-side success notification without a full page reload.
Quick Start
Use the litestar-htmx skill to add an HTMX-powered item creation form to your Litestar app that updates a partial list and shows a success notification without reloading the page.