Skip to main content

Properties

The Chat Component can be customized by configuring various properties or adding events to perform specific actions. To learn how to build a chatbot, refer to the Chat Component Overview guide. For more information on CSAs and Exposed Variables, check out the Component Specific Actions guide.

Properties

PropertyDescriptionExpected Value
Chat TitleTitle of the chat component.String (e.g. ToolJet Support Chatbot)
Initial ChatInitial messages to be loaded when the chat starts.Array of Objects ( e.g. {{[ { message: 'Hey! Welcome to ToolJet. How may I help you?' } ]}} )
User NameDefines the user's name.String (e.g. John Doe)
User AvatarDefines the user's avatar.Image URL
Respondent NameDefines the respondent's name.String (e.g. ToolJet Bot)
Respondent AvatarDefines the respondent's avatar.Image URL

Message Object Properties

PropertyDescriptionRequiredExpected Value
MessageThe content of the message.RequiredString (e.g. "Hey! How can I help you?")
Message IDID of the message.Auto-generatedString (e.g. "e3dd6f60-d5e8-46c5-b73b-006f2f4a34f2")
TimestampDate and Time of the message.Auto-generatedDateTime in ISO 8601 format (e.g. "2025-02-05T09:33:32.468Z")
NameMessage sender's name.OptionalString (e.g. "John Doe")
AvatarMessage sender's avatar.OptionalImage URL
TypeType of the message.RequiredAccepted Values: "response", "message" or "error".

Events

EventDescription
On history clearedTriggers whenever the history is cleared.
On message sentTriggers whenever a message is sent.

Additional Actions

All the following actions can be enabled or disabled either by using the toggle switch or by dynamically configuring the value by clicking on fx and entering a logical expression.

ActionDescription
VisibilityControls the component's visibility.
Disable input stateEnables or disables the input state.
Histroy loading stateEnables the history loading state, often used with isLoading to indicate progress.
Response loading stateEnables the response loading state, often used with isLoading to indicate progress.
Enable clear history buttonEnables or disables the clear history button.
Enable download history buttonEnables or disables the delete history button.

Devices

Property
Description
Expected Value
Show on desktopMakes the component visible in desktop view.You can set it with the toggle button or dynamically configure the value by clicking on fx and entering a logical expression.
Show on mobileMakes the component visible in mobile view.You can set it with the toggle button or dynamically configure the value by clicking on fx and entering a logical expression.

Styles

Message

Property
Description
Configuration Options
NameSets the color for the sender's name.Select a color from the color picker or set it programmatically using fx.
MessageSets the color for the message text.Select a color from the color picker or set it programmatically using fx.
TimestampSets the color for the timestamp.Select a color from the color picker or set it programmatically using fx.

Field

Property
Description
Configuration Options
BackgroundSets the background color of the input field.Select a color from the color picker or set it programmatically using fx.
BorderSets the border color of the input field.Select a color from the color picker or set it programmatically using fx.
AccentSets the accent color of the input field.Select a color from the color picker or set it programmatically using fx.
TextSets the text color of the input field.Select a color from the color picker or set it programmatically using fx.
Send iconSets the color of the send icon.Select a color from the color picker or set it programmatically using fx.

Container

Property
Description
Configuration Options
BackgroundSets the background color of the chat container.Select a color from the color picker or set it programmatically using fx.
BorderSets the border color of the chat container.Select a color from the color picker or set it programmatically using fx.
Box shadowSets the box shadow color of the chat container.Select a color from the color picker or set it programmatically using fx.
Border radiusSets the corner radius of the chat container.Enter a numeric value (default: 6) or set it programmatically using fx.
info

Any property having fx button next to its field can be programmatically configured.