Rechat SDK
    Preparing search index...

    Interface RechatRootAttributes

    Attributes accepted by the <rechat-root> tag — provides brand, authorization, and API URL context to every nested Rechat element.

    interface RechatRootAttributes {
        api_url?: string;
        authorization?: string;
        brand_id?: string;
        "color-mode"?: "light" | "dark" | "auto";
        "data-theme"?: RechatThemeName;
    }
    Index

    Properties

    api_url?: string
    authorization?: string
    brand_id?: string
    "color-mode"?: "light" | "dark" | "auto"

    Selects the colour scheme applied inside this <rechat-root>. "auto" follows the viewer's OS preference (prefers-color-scheme); "light" and "dark" force a mode. Like data-theme, it inherits through shadow DOM to every nested Rechat element. Defaults to light when omitted.

    "light"
    
    "data-theme"?: RechatThemeName

    Selects which CSS theme block applies inside this <rechat-root>. The default is "rechat". CSS variables inherit through shadow DOM, so setting this attribute on <rechat-root> (or any ancestor such as <body>) propagates the theme to every nested Rechat element with zero JavaScript.

    "rechat"
    
    <rechat-root data-theme="compass">
    <rechat-listings></rechat-listings>
    </rechat-root>