Message
Root container for a single posted bot message, with an optional accent color rail.
Overview
Message is the root container for one posted message. Every card you post with thread.post starts with a Message wrapping the blocks that make it up — headers, sections, fields, action rows.
Import
import { Message } from "@copilotkit/bot-ui";Props
Prop
Type
Prop
Type
Usage
import { Message, Header, Section, Context } from "@copilotkit/bot-ui";
function IssueCard({ id, title }: { id: string; title: string }) {
return (
<Message accent="#5865F2">
<Header>{id}</Header>
<Section>{title}</Section>
<Context>Updated just now</Context>
</Message>
);
}On Slack
Renders as the message's blocks array — capped at 50 blocks per message (SLACK_LIMITS.blocksPerMessage); the renderer clamps overflow instead of failing. With accent, the blocks move into a colored attachment.
Related
- Thread.post — posting a rendered message
- renderToIR — how JSX becomes the BotNode IR
- renderBlockKit — Block Kit translation and budgets