inboost-widget-client
v2.1.0
Published
To install widget to some project
Downloads
19
Readme
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>