Skip to main content

Message Templates

@asgard-js/react ships with 8 built-in message template types. Select a template below to see how it renders inside the chatbot panel.

Select Template

Click a template type to see how it renders.

Loading chatbot...

Code Example

import { Chatbot } from "@asgard-js/react";
import { createTextTemplateExample } from "./mocks/messages";

export function Demo() {
return (
<Chatbot
title="Text Template Demo"
config={{ botProviderEndpoint: "skip" }}
customChannelId="templates-demo"
initMessages={[createTextTemplateExample()]}
/>
);
}

Supported Templates

TemplateDescription
textPlain or rich text messages with optional quick replies
hintContextual hint bubbles
buttonInline action buttons (uri, message, emit)
carouselSwipeable card carousel
imageImage with caption
chartVega-lite chart rendering
tableStructured tabular data
mathLaTeX-style math formulas