VOOZH about

URL: https://four.htmx.org/extensions

⇱ Extensions ~ htmx


htmx 4.0 is under construction — migration guide

Networking

hx-sseStream updates via Server-Sent Events (SSE)Stream updates via Server-Sent Events (SSE)
hx-wsEnable bidirectional connections over WebSockets (WS)Enable bidirectional connections over WebSockets (WS)

Performance

hx-preloadPreload content on hover for instant page loadsPreload content on hover for instant page loads
hx-ptagSkip swaps when polled content hasn't changedSkip swaps when polled content hasn't changed
hx-history-cacheCache pages in sessionStorage for instant back/forwardCache pages in sessionStorage for instant back/forward

UX

hx-optimisticApply optimistic UI updates before the server respondsApply optimistic UI updates before the server responds
hx-downloadSave responses as file downloads with progress eventsSave responses as file downloads with progress events
hx-browser-indicatorShow the browser's native loading indicatorShow the browser's native loading indicator
hx-liveAdd lightweight reactivity backed by the DOMAdd lightweight reactivity backed by the DOM
hx-promptPrompt before a request, send the answer as a headerPrompt before a request, send the answer as a header

Swap behaviors

hx-headMerge head tags (styles, scripts) into htmx responsesMerge head tags (styles, scripts) into htmx responses
hx-upsertUpdate or insert elements by ID for dynamic listsUpdate or insert elements by ID for dynamic lists
hx-targetsSwap one response into multiple elements at onceSwap one response into multiple elements at once

Compatibility

htmx-2-compatRestore htmx 2.x defaults and event names on htmx 4Restore htmx 2.x defaults and event names on htmx 4
hx-alpine-compatRun htmx alongside Alpine.js without conflictsRun htmx alongside Alpine.js without conflicts

Security

hx-cspMake htmx work under strict Content Security PolicyMake htmx work under strict Content Security Policy