REFERENCE
SDK Demos
How to use @asgard-js/core and @asgard-js/react, with demos you can try on the page.
Message Actions
Add custom action buttons below each bot message — useful for thumbs up/down feedback, copy, share, and more.
Example
<Chatbot
messageActions={(message) => [
{ id: "copy", label: "📋 Copy" },
{ id: "thumbs-up", label: "👍" },
{ id: "thumbs-down", label: "👎" },
]}
onMessageAction={(actionId, message) => {
console.log(actionId, message.messageId);
// Send to your analytics / feedback API
}}
{...rest}
/>MessageActionConfigField Type Description idstringUnique action ID labelstringButton display label messageActionsis a function that receives aConversationBotMessageand returnsMessageActionConfig[]. You can vary the actions based on message content.