|
| 1 | +# htmx |
| 2 | + |
| 3 | +htmx is a small, dependency-free JavaScript library that extends HTML with attributes for AJAX, CSS transitions, WebSockets, Server-Sent Events, and hypermedia-driven UI patterns. |
| 4 | + |
| 5 | +## Important docs |
| 6 | + |
| 7 | +- [Documentation](https://htmx.org/docs/) — core concepts, installation, attributes, requests, responses, events, security, and configuration |
| 8 | +- [Reference](https://htmx.org/reference/) — quick reference for attributes, events, headers, CSS classes, API, and config |
| 9 | +- [Examples](https://htmx.org/examples/) — practical patterns such as active search, lazy loading, inline validation, and dialogs |
| 10 | +- [Extensions](https://htmx.org/extensions/) — official extensions including idiomorph, preload, response-targets, SSE, and WebSocket support |
| 11 | +- [API](https://htmx.org/api/) — JavaScript API reference for integrating and extending htmx |
| 12 | + |
| 13 | +## Reference documentation |
| 14 | + |
| 15 | +- [Attribute reference](https://htmx.org/reference/#attributes) |
| 16 | +- [Event reference](https://htmx.org/reference/#events) |
| 17 | +- [Request headers](https://htmx.org/reference/#request_headers) |
| 18 | +- [Response headers](https://htmx.org/reference/#response_headers) |
| 19 | +- [Configuration options](https://htmx.org/reference/#config) |
| 20 | +- [hx-boost](https://htmx.org/attributes/hx-boost/) |
| 21 | +- [hx-get](https://htmx.org/attributes/hx-get/) |
| 22 | +- [hx-post](https://htmx.org/attributes/hx-post/) |
| 23 | +- [hx-swap](https://htmx.org/attributes/hx-swap/) |
| 24 | +- [hx-target](https://htmx.org/attributes/hx-target/) |
| 25 | +- [hx-trigger](https://htmx.org/attributes/hx-trigger/) |
| 26 | + |
| 27 | +## Examples |
| 28 | + |
| 29 | +- [Active Search](https://htmx.org/examples/active-search/) |
| 30 | +- [Click to Edit](https://htmx.org/examples/click-to-edit/) |
| 31 | +- [Inline Validation](https://htmx.org/examples/inline-validation/) |
| 32 | +- [Infinite Scroll](https://htmx.org/examples/infinite-scroll/) |
| 33 | +- [Lazy Loading](https://htmx.org/examples/lazy-load/) |
| 34 | +- [Modal Dialogs](https://htmx.org/examples/modal-custom/) |
| 35 | + |
| 36 | +## Essays and concepts |
| 37 | + |
| 38 | +- [Hypermedia-Driven Applications](https://htmx.org/essays/hypermedia-driven-applications/) |
| 39 | +- [HATEOAS](https://htmx.org/essays/hateoas/) |
| 40 | +- [SPA Alternative](https://htmx.org/essays/spa-alternative/) |
| 41 | +- [When To Use Hypermedia](https://htmx.org/essays/when-to-use-hypermedia/) |
| 42 | +- [Locality of Behaviour](https://htmx.org/essays/locality-of-behaviour/) |
| 43 | + |
| 44 | +## Source repository |
| 45 | + |
| 46 | +- [bigskysoftware/htmx](https://github.com/bigskysoftware/htmx) |
| 47 | + |
| 48 | +## Guidance for LLMs and coding agents |
| 49 | + |
| 50 | +- Prefer HTML-first, hypermedia-driven solutions over client-heavy SPA patterns. |
| 51 | +- Treat `https://htmx.org/docs/` as the main conceptual guide and `https://htmx.org/reference/` as the canonical quick reference. |
| 52 | +- When suggesting htmx usage, respond with server-rendered HTML examples unless JavaScript is specifically required. |
| 53 | +- Prefer documented attributes, headers, events, and extensions over invented abstractions. |
| 54 | +- Use examples and essays to explain intended design patterns, tradeoffs, and architectural style. |
0 commit comments