AI Message Bubble
An assistant reply with a formula, a comparison table and a copyable SQL query in a chat.
About this block
What it's for
- An assistant reply with a formula, a comparison table and a copyable SQL query in a chat.
- A data copilot message that explains a metric with LaTeX and returns the snippet to reproduce it.
- A technical support thread where the agent attaches shell commands with a copy button.
Includes
- Markdown rendering
- Fenced code blocks
- Code block copy
- Message copy
- Aligned tables
- Latex inline and display
- Latex source copy
- Malformed tex fallback
Works with
- Radix UI primitives (the registry variant it ships in)
- React 19, Next.js App Router and Tailwind CSS 4, installed with the shadcn CLI
- Your theme tokens, in light and dark mode
Install
Included with Agentic UI Kit (one-time license). Install needs your license key: see pricing · connect your project.
Agentic UI CLI
agentic-ui add ai-message-bubbleInstalls through shadcn and adapts the component to your design tokens.
shadcn CLI
npx shadcn@4.17.0 add @agentic-ui/ai-message-bubbleUsed in
A standalone component: drop it into any screen.
- Type
- Block
- Variants
- Radix UI
- Themes
- Light and dark
- Widths
- Preview it at desktop, tablet and mobile widths above.
- Motion
- Animated, with a reduced-motion fallback
- Sample data
- Ships with sample data in
data.ts; replace it with your own.
- npm packages
katex- Registry dependencies
ai-stream-rendererlib-primitives- Files
4 files
- components/agentic-ui/ai-message-bubble/index.tsx
- components/agentic-ui/ai-message-bubble/data.ts
- components/agentic-ui/ai-message-bubble/math.ts
- components/agentic-ui/ai-message-bubble/types.ts
Related components
AI Action Confirmation
Operations agent that asks to drop production tables and shows the rows, size and last use of each one.
Details and live previewAI Agent Memory Viewer
Assistant settings where the user reviews and corrects what the agent knows about them (time zone, style preferences).
Details and live previewAI Agent Status Badge
Header of an agent run that moves from working to waiting-approval and opens the approval on click.
Details and live previewAI Chat Empty State
Assistant chat with no messages that offers four starting points configured by the workspace.
Details and live preview