templUI & HTMX/Alpine Best Practices Apply templUI patterns and HTMX/Alpine.js best practices when building Go/Templ web applications.
| HTMX | Server-driven interactions | AJAX requests, form submissions, partial page updates, live search | | Alpine.js | Client-side state & reactivity | Toggles, animations, client-side filtering, transitions, local state | | templUI | Pre-built UI components | Dropdowns, dialogs, tabs, sidebars (uses vanilla JS via Script() templates) |
Note: templUI components use vanilla JavaScript (not Alpine.js) via Script() templates. This is fine - Alpine.js is still part of the stack for your custom client-side needs.
시기: 사용자는 templUI 구성 요소를 사용하여 Go/Templ 웹 앱을 구축하고 사이트를 Templ로 변환하고 있습니다. templ 구문, Script() 템플릿, HTMX/Alpine 통합, templ의 JavaScript, 또는 .templ 파일로 작업합니다. 또한 사용자가 "구성 요소 라이브러리", "UI 구성 요소"를 언급하는 경우에도 트리거됩니다. Go 웹 프로젝트의 "버튼/카드/모달/테이블", "templ generate", Go가 포함된 Alpine.js, 또는 React/Vue 없이 Go에서 대화형 UI를 구축하는 방법을 묻습니다. .templ 파일이 있을 때마다 활성화 프로젝트에 존재하거나 templUI가 종속성에 있습니다. 그렇지 않은 경우: Go가 아닌 프로젝트, 순수 JavaScript/TypeScript 프런트엔드 프레임워크 출처: gopherguides/gopher-ai.