Skip to main content

Message Templates

@asgard-js/react ships with 10 built-in message template types, plus Math (LaTeX) and References (RAG citations) as extended renderers. 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
audioAudio player
videoVideo player (supports YouTube embeds)
locationGoogle Maps card
chartVega-lite chart rendering
tableStructured tabular data
mathLaTeX-style math formulas
referencesRAG citation sources (appended below any template)