Attributes

Content

Attributes that control texts, messages, and suggestions.

All text attributes support internationalization. See Internationalization for format details.

name

Bot name displayed in the chat window header.

PropertyValue
Typestring | I18nString
Default''
<tolki-chat bot="..." name="Tolki Assistant"></tolki-chat>
<tolki-chat bot="..." name='{"en":"Assistant","it":"Assistente"}'></tolki-chat>
<tolki-chat bot="..." name="en:Assistant|it:Assistente"></tolki-chat>

message-placeholder

Placeholder text shown in the input area when it is empty.

PropertyValue
Typestring | I18nString
DefaultMultilingual: "Ask anything" / "Chiedi qualsiasi cosa" / etc.
<tolki-chat bot="..." message-placeholder="Type a message..."></tolki-chat>
<tolki-chat bot="..." message-placeholder='{"en":"Type a message...","it":"Scrivi un messaggio..."}'></tolki-chat>
<tolki-chat bot="..." message-placeholder="en:Type a message...|it:Scrivi un messaggio..."></tolki-chat>

toggle-placeholder

Text displayed next to the toggle button (useful for adding a label to the open button).

PropertyValue
Typestring | I18nString
Default'' (no text)
<tolki-chat bot="..." toggle-placeholder="Need help?"></tolki-chat>
<tolki-chat bot="..." toggle-placeholder="en:Need help?|it:Hai bisogno di aiuto?"></tolki-chat>

welcome-message

Welcome message displayed when the chat opens, before the user types anything.

PropertyValue
Typestring | I18nString
Defaultnull (no message)
<tolki-chat bot="..." welcome-message="Hi! How can I help you?"></tolki-chat>
<tolki-chat bot="..." welcome-message='{"en":"Hi! How can I help?","it":"Ciao! Come posso aiutarti?"}'></tolki-chat>
<tolki-chat bot="..." welcome-message="en:Hi! How can I help?|it:Ciao! Come posso aiutarti?"></tolki-chat>

suggestions

List of quick suggestions shown below the welcome message. Users can click them to quickly send a predefined message.

PropertyValue
Typestring[] | I18nArray
Default[] (no suggestions)
<tolki-chat bot="..." suggestions="Pricing,Support,Contact"></tolki-chat>
<tolki-chat bot="..." suggestions='["How much?","How it works?","Contact us"]'></tolki-chat>
<tolki-chat bot="..." suggestions='[{"en":"Pricing","it":"Prezzi"},{"en":"Support","it":"Assistenza"}]'></tolki-chat>
<tolki-chat bot="..." suggestions="en:Pricing|it:Prezzi,en:Support|it:Assistenza"></tolki-chat>

toasts

List of toast messages displayed as temporary notifications.

PropertyValue
Typestring[] | I18nArray
Default[] (no toasts)

Supported formats are the same as suggestions.

<tolki-chat bot="..." toasts="Welcome!,Need help?"></tolki-chat>
<tolki-chat bot="..." toasts='[{"en":"Welcome!","it":"Benvenuto!"}]'></tolki-chat>