pocketbase-htmx

Integrate HTMX with PocketBase Go apps for server-rendered UI.

Updated Sep 28, 2025
One-click install
npx skills add https://github.com/jbhicks/sound-cistern --skill pocketbase-htmx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pocketbase-htmx
Source: https://github.com/jbhicks/sound-cistern/tree/main/skill/pocketbase-htmx
Command: npx skills add https://github.com/jbhicks/sound-cistern --skill pocketbase-htmx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables developers to create highly responsive PocketBase Go applications by integrating HTMX to load partial HTML, handle forms, and update content without writing custom JavaScript.

Core Features & Use Cases

  • HTMX-powered UI without client-side JS: Use HTMX attributes to fetch and swap HTML fragments from PocketBase endpoints.
  • Common patterns: Loading lists, forms, modals, validation, and live updates via Server-Sent Events or WebSockets.
  • Use Case: Build a dynamic admin panel to manage posts: list posts, create/edit forms, and live updates with minimal JS.

Quick Start

To begin, add the HTMX library, wire up route handlers in Go following the patterns shown, and render partial templates for HTMX requests.

Frequently Asked Questions about pocketbase-htmx

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

FAQPage Schema
How do I build dynamic UI in PocketBase without writing client-side JavaScript?

You can build dynamic UI in PocketBase without writing client-side JavaScript by integrating HTMX to fetch and swap HTML fragments from Go route handlers. This approach renders partial templates directly to update content like forms and lists.

Can I use HTMX with PocketBase Go apps to handle forms and modals?

Yes, you can use HTMX with PocketBase Go apps to handle forms and modals. The integration applies common patterns for loading lists, form submissions, validation, and modals by returning partial HTML fragments from your Go endpoints.

How do HTMX Server-Sent Events or WebSockets work for live updates in a Go application?

HTMX Server-Sent Events and WebSockets deliver live-like updates in a Go application by pushing partial HTML fragments to the client. This allows you to build interactive dashboards and lists that update in real-time without heavy JavaScript.

What is the best way to detect HTMX requests in PocketBase route handlers?

The best way to detect HTMX requests in PocketBase route handlers is by checking for proper HTMX headers. Your Go handlers can then conditionally render partial HTML templates for HTMX requests instead of full page loads.

Do I need a Go development environment to use HTMX with PocketBase?

Yes, you need a Go development environment along with the PocketBase framework and the HTMX library. You must implement Go templates, handlers, and routes according to the described patterns to return partial HTML fragments.

What are the limitations of using HTMX for server-rendered UI in PocketBase?

Using HTMX for server-rendered UI in PocketBase requires managing partial HTML fragments and HTMX headers in your Go code. Complex UI state management may still require some JavaScript despite minimizing client-side logic for core interactions.