Custom Components
This section describes how you can pass in your own message types to be rendered in the WebChat application.
How to create & use your custom components
<your-message-component
:msg="" // Message object - the current message object. See the API docs for more details
:theme="" // Theme object - taken from the theme/colours that you passed into your settings or set in the interface settings section of OpenDialog
:latest="" // boolean - derived dynamically from the current message history. Indicates whether the message is the latest one in the list
:errorTemplates="" // object - uses settings.messages from the config endpoint
:language="" // string - the currently selected language code
@submit="(data: any) => onComponentSubmit(data.type, data.data)"
@cancel="onCancel(message)"
/>A working example
Last updated