createChatbox method

Chatbox createChatbox(
  1. ConversationBuilder? selectedConversation,
  2. ChatboxOptions? options
)

Creates a Chatbox UI

@remarks The Chatbox is a slimmer version of the Inbox. It shows a single conversation, without means to switch between conversations. You typically want to call the mount method after creating the Chabox to make it visible on your app.

Call createChatbox on any page you want to show a chatbox of a single conversation.

Passing null for selectedConversation parameter will initialize TalkJS upon mounting, but will not display a UI yet. You need to call chatbox.select(conversation) in order to render the UI with a conversation. This is useful for preloading the chatbox in some situations.

When you call createChatbox() with undefined or without a parameter, it is going to render the user's latest active conversation in the UI upon mounting.

@param selectedConversation - Select the conversation to show in the UI. @param options - Optional. Use these to finetune the behavior of the Chatbox.

Implementation

external Chatbox createChatbox(
    ConversationBuilder? selectedConversation, ChatboxOptions? options);