UNPKG

@supportai.it/chat-widget

Version:

Chat widget web component for supportAI.it

70 lines (69 loc) 1.58 kB
interface ChatWidgetProps { /** * Unique identifier for the chat */ "chat-id": string; /** * API key for authentication */ "api-key": string; /** * Background color of the chat button * @default "#582975" */ "button-color"?: string; /** * Background color of the chat button on hover * @default "#7b2ba6" */ "button-hover-color"?: string; /** * Size of the chat button * @default "64px" */ "button-size"?: string; /** * Message bubble text or boolean to disable * @default "Ciao, sono l'assistente virtuale di supportAI, se hai bisogno di assistenza apri la chat!" */ "message-bubble"?: string | boolean; /** * Alignment of the chat widget * @default "right" */ "chat-align"?: "left" | "right"; /** * Custom SVG icon for the chat button * @default Built-in SupportAI icon */ "svg-icon"?: string; /** * Chat width * @default "400px" */ "chat-width"?: string; /** * Chat height * @default "600px" */ "chat-height"?: string; /** * Base URL for the chat service */ "base-url"?: string; } declare global { /** * Extend HTMLElement with custom properties */ interface HTMLElementTagNameMap { "chat-widget": HTMLElement & ChatWidgetProps; } /** * Extend Window to support custom events */ interface WindowEventMap { "chat-widget/updateContext": CustomEvent; } } export { ChatWidgetProps };