API
The library is intentionally broken up into multiple files so that you can import only the part you need where you need it to help prevent server side features from being leaked to the client just because you wanted to use one of htmx-router
's apis on the client.
Feature | Package | Description |
---|---|---|
Cookies | htmx-router/cookies |
Request/Response cookie helper with client-side document.cookie support |
CSS | htmx-router/css |
CSS sheet builder with name collision prevention |
Defer | htmx-router/defer |
End-to-end type-safe html partial loading |
Endpoint | htmx-router/endpoint |
Define a new endpoint without making a whole new route |
Server Side Event | htmx-router/event-source |
Helper for creating the sse for an EventSource |
Navigate | Some helpers for client side htmx actions | |
Response | htmx-router/response |
Helpers to render typed json responses, and trigger client side navigation and revalidation |
Shell | htmx-router/shell |
Helpers to generate: html, opengraph, and json+ld meta-tags |