Attributes
Behavior
Attributes that control the widget's interactive behavior.
default-open
When set, the chat window opens automatically on page load.
| Property | Value |
|---|---|
| Type | boolean |
| Default | true |
<!-- Chat open on load -->
<tolki-chat bot="..." default-open></tolki-chat>
<tolki-chat bot="..." default-open="true"></tolki-chat>
<!-- Chat closed on load -->
<tolki-chat bot="..." default-open="false"></tolki-chat>
expandable
Allows the user to expand the chat window to fullscreen.
| Property | Value |
|---|---|
| Type | boolean |
| Default | true |
<!-- Expansion enabled (default) -->
<tolki-chat bot="..." expandable></tolki-chat>
<!-- Expansion disabled -->
<tolki-chat bot="..." expandable="false"></tolki-chat>
show-rating
Shows a conversation rating prompt (1–5 stars) after a period of inactivity following an assistant response. The rating is shown only once per chat session.
Accepts true (default delay of 90 seconds), false (disabled), or a number of seconds for a custom delay.
| Property | Value |
|---|---|
| Type | boolean | number |
| Default | true (90 seconds) |
<!-- Rating enabled with default delay (90s) -->
<tolki-chat bot="..." show-rating></tolki-chat>
<!-- Rating disabled -->
<tolki-chat bot="..." show-rating="false"></tolki-chat>
<!-- Custom delay: 30 seconds -->
<tolki-chat bot="..." show-rating="30"></tolki-chat>
show-docs
When enabled, the assistant toolbar shows a "Sources" button that opens an overlay with the document search results used to generate the response.
| Property | Value |
|---|---|
| Type | boolean |
| Default | false |
<!-- Show document sources -->
<tolki-chat bot="..." show-docs></tolki-chat>
<!-- Hide document sources (default) -->
<tolki-chat bot="..." show-docs="false"></tolki-chat>
This attribute is automatically enabled on
localhost and studio.tolki.ai.unclosable
When enabled, the user cannot close the chat window. Useful for inline widgets or when the chat must always remain visible.
| Property | Value |
|---|---|
| Type | boolean |
| Default | false |
<!-- Chat cannot be closed -->
<tolki-chat bot="..." unclosable></tolki-chat>
<!-- Standard behavior (closable) -->
<tolki-chat bot="..." unclosable="false"></tolki-chat>