Skip to content

Config Setup (optional)

You can optionally define a htmx.config.json which needs to specify which framework you are using, and can then also define extra properties for client islands, and for building the pre-made htmx-router components for your framework.

The current structure of this config is as follows:

htmx.config.json type
type Config = {
    framework: "react" | "generic" | string,
    client?: {
        source: string,
        output: {
            server: string,
            client: string
        }
    }
    component?: Record<string, string>
}