@debox-pro/chat-widget-html
v0.0.8
Published
Use `DeBoxChatWidget` with `HTML`
Maintainers
Readme
@debox-pro/chat-widget-html
Use DeBoxChatWidget with HTML
Getting Started
- Need to use
NPM
npm install @debox-pro/chat-widget-html- Use DeBoxChatWidget
Not Support SSR
init
import { DeBoxChatWidget } from '@debox-pro/chat-widget-html' // Singleton
DeBoxChatWidget.init({
projectId: string
conversationId?: string
zIndex?: string
containerDomId?: string
defaultOpen?: boolean // Whether to open the chat window by default (PC only), default is false
destroyOnClose?: boolean // Whether to destroy the widget when closed, default is false
})destroy
DeBoxChatWidget.destroy()setConversation
DeBoxChatWidget.setConversation(id?: string, open?: boolean)toggleChat
DeBoxChatWidget.toggleChat(open?: boolean)tag
If you want to know if the example has been initialized
console.log(DeBoxChatWidget.tag)css
debox-chat-widget {
--debox-chat-bottom: 30px; /* Distance from bottom */
--debox-chat-right: 30px; /* Distance from right */
--debox-chat-bubble-width: 60px; /* Bubble size */
--debox-chat-height: 600px; /* Window height */
--debox-chat-width: 375px; /* Window width */
--debox-chat-scale: 1; /* Overall UI scale */
}Examples
...
