inboost-widget-client

2.1.0 • Public • Published

INBOOST widget client

To install widget to some project

API

createWidget({
    apiKey: string;
    selector?: string;
    apiDomain: string;
    config?: {
        placeLocation: "Right" | "Left";
        indentation: {
            onSide: number;
            onBottom: number;
        };
    };
    widgetDomain?: string;
})

Installation

npm

npm install inboost-widget-client
import * as iWidget from "inboost-widget-client";

document.addEventListener("DOMContentLoaded", () => {
    iWidget.createWidget({
        apiKey: // client API key from inboost
        selector: // by default its body
        apiDomain: // client portal API domain
        config: {
            placeLocation: // by default Right
            indentation: {
                onSide: // px from placeLocation
                onBottom: // px
            }
        }
        widgetDomain: // by default https://widgets.inboost.ai/
    })
})

html

<body>
    <div id="widget"></div>
    <script src="https://www.npmjs.com/package/inboost-widget-client"></script>

     <script>
            window.createWidget({ 
                apiKey: // client API key from inboost, 
                apiDomain: // client portal API domain, 
                selector: "#widget" 
                 config: {
                    placeLocation: // by default Right
                    indentation: {
                        onSide: // px from placeLocation
                        onBottom: // px
                    }
                }
                widgetDomain: // by default https://widgets.inboost.ai/
            });
    </script>
</body>

/inboost-widget-client/

    Package Sidebar

    Install

    npm i inboost-widget-client

    Weekly Downloads

    4

    Version

    2.1.0

    License

    ISC

    Unpacked Size

    37.6 kB

    Total Files

    9

    Last publish

    Collaborators

    • pashafd
    • taras_inboost