1.0.13 • Published 2 months ago

@supportai.it/chat-widget v1.0.13

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Universal Chat Widget

npm.io

Installation

Usign CND:

<script src="https://cdn.jsdelivr.net/npm/@supportai.it/chat-widget"></script>

Using npm

npm install @supportai.it/chat-widget

Usage

JS

<chat-widget
  chat-id="chat-id"
  api-key="api-key"
  button-color="#ff0000"
  button-size="56px"
></chat-widget>

React

import "@supportai.it/chat-widget";

function App() {
  return (
    <chat-widget
      chat-id="chat-id"
      api-key="api-key"
    ></chat-widget>
  );
}

Vue

<script setup>
  import '@supportai.it/chat-widget'
</script>

<template>
  <chat-widget
    chat-id="chat-id"
    api-key="api-key"
  ></chat-widget>
</template>

Updating Context Dynamically

window.dispatchEvent(new CustomEvent("chat-widget/updateContext", {
  detail: {
    /* your object here */
  },
}));

Props

  • chat-id: The ID of the chat to be opened.
  • api-key: The API key for authentication.
  • button-color: Custom button color (Default: #582975)
  • button-hover-color: Custom hover color (Default: #7b2ba6)
  • button-size: Button size (Default: 64px)
  • message-bubble: Display a message bubble on top of the open button (when the chat is closed). Set to false to disable.
  • chat-align: Chat alignment "left" or "right". (Default: right)
  • chat-width: Chat width (Default: 400px)
  • chat-height: Chat height (Default: 600px)
1.0.13

2 months ago

1.0.12

3 months ago

1.0.11

3 months ago

1.0.10

4 months ago

1.0.9

4 months ago

1.0.8

4 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago