The WebSockets extension provides bidirectional real-time communication for htmx, following the same patterns established by the built-in SSE (Server-Sent Events) streaming support.
- Consistency with SSE - Incoming messages use the same swapping behavior (
hx-target,hx-swap,<hx-partial>) - Leverage existing attributes - Reuse
hx-vals,hx-include,hx-trigger,hx-config