Module Htmx.Extensions

Helpers that load official htmx extensions from unpkg.

Each function emits a <script src="..."> tag for the matching htmx-ext-* package. Pin the version in production:

ocaml
  <Htmx.Extensions.sse version="2.2.2" />

  (* <script src="https://unpkg.com/htmx-ext-sse@2.2.2"></script> *)

See the official extensions list.

ocaml
val sse : ?version:string -> unit -> JSX.element

Loads htmx-ext-sse.

ocaml
val ws : ?version:string -> unit -> JSX.element

Loads htmx-ext-ws.

ocaml
val class_tools : ?version:string -> unit -> JSX.element

Loads htmx-ext-class-tools.

ocaml
val preload : ?version:string -> unit -> JSX.element

Loads htmx-ext-preload.

ocaml
val path_deps : ?version:string -> unit -> JSX.element

Loads htmx-ext-path-deps.

ocaml
val loading_states : ?version:string -> unit -> JSX.element

Loads htmx-ext-loading-states.

ocaml
val response_targets : ?version:string -> unit -> JSX.element

Loads htmx-ext-response-targets.

ocaml
val head_support : ?version:string -> unit -> JSX.element

Loads htmx-ext-head-support.