htmx

Integrate HTMX attributes in Django for server-rendered HTML swaps.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/felipe3dfx/dotfiles --skill htmx-felipe3dfx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: htmx
Source: https://github.com/felipe3dfx/dotfiles/tree/main/skills/htmx
Command: npx skills add https://github.com/felipe3dfx/dotfiles --skill htmx-felipe3dfx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of adding dynamic, server-rendered user interface updates to web applications without writing extensive JavaScript.

Core Features & Use Cases

  • Dynamic Content Loading: Easily load and swap content sections on a page via AJAX requests.
  • Server-Driven UI: Leverage server-side logic to dictate UI changes, simplifying frontend state management.
  • Use Case: Implement a "load more" button on a product listing page that fetches and appends new items to the existing list without a full page reload.

Quick Start

Use the htmx skill to add a hx-get attribute to the provided button element that targets the #js-item-list div.

Frequently Asked Questions about htmx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update partial page content in Django without writing JavaScript?

To update partial page content without JavaScript, use htmx attributes like `hx-get` to fetch server-rendered HTML and swap specific page sections via AJAX. This enables dynamic interactions directly from your Django views without custom frontend logic.

What is the best way to implement a load more button for a product list using AJAX?

Implementing a load more button involves adding an `hx-get` attribute to the button element targeting the product list div. The Django server responds with rendered HTML items that htmx appends to the existing list without triggering a full page reload.

Can I use Django class-based views with htmx for filtering and request handling?

Yes, you can use Django class-based views (CBVs) with htmx. The skill provides specific CBV mixins designed to handle htmx requests, simplifying partial template rendering, out-of-band swaps, and form submission filtering logic.

Does htmx support out-of-band swaps for updating multiple page elements simultaneously?

Htmx supports out-of-band swaps, allowing a single server response to update multiple distinct page elements simultaneously. This server-driven UI approach simplifies frontend state management by dictating UI changes directly from Django.

When should I use server-driven UI over a JavaScript frontend framework?

Use server-driven UI when you want to avoid extensive JavaScript and leverage server-side logic to dictate UI changes. It simplifies frontend state management by relying on server-rendered HTML swaps instead of heavy client-side rendering.

How do I handle form submissions with partial page updates in Django?

Handle form submissions by configuring htmx attributes to post data via AJAX. The Django server processes the form and returns a server-rendered HTML response, which htmx uses to swap or update the relevant page sections without a full reload.