> ## Documentation Index
> Fetch the complete documentation index at: https://anvil.servicetitan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Markdown Message – Code

> MarkdownMessage displays rich formatted responses with markdown support.

> [!WARNING]
>
> Atlas is deprecated. Use [AI Kit](https://anvil.servicetitan.com/docs/building-agentic-experiences) for any new Atlas experiences.

> [tab] Implementation
>
> ext-atlas-markdown-message-demo
>
> [StackBlitz demo](https://stackblitz.com/github/servicetitan/anvil2-docs-live-code/tree/main/examples/ext-atlas-markdown-message-demo?file=src/App.tsx)
>
> ```tsx lines expandable theme={null}
> import { MarkdownMessage, UserFeedback } from "@servicetitan/anvil2-ext-atlas";
> import { Card } from "@servicetitan/anvil2";
>
> function App() {
>   return (
>     <Card
>       flexDirection="column"
>       gap={4}
>       background="strong"
>       style={{ width: "388px" }}
>     >
>       <MarkdownMessage
>         message="# Hello World
>
> This is a **markdown** message with *formatting*.
>
> - Item 1
> - Item 2
> - Item 3"
>         assistant="Atlas"
>         onRetry={() => console.log("retry clicked")}
>         toolboxProps={{
>           onLike: async () => console.log("like clicked"),
>           onDislike: async () => console.log("dislike clicked"),
>           onFlag: async () => console.log("flag clicked"),
>           onPlay: async () => console.log("play clicked"),
>           currentFeedback: UserFeedback.None,
>         }}
>       />
>     </Card>
>   );
> }
>
> export default App;
> ```
>
> ## Common Examples
>
> ### Basic Usage
>
> Display rich markdown content:
>
> ```tsx theme={null}
> import { MarkdownMessage } from "@servicetitan/anvil2-ext-atlas";
>
> function MarkdownMessageExample() {
>   return (
>     <MarkdownMessage
>       message="Here are some options:\n\n1. **Option A** - First choice\n2. **Option B** - Second choice"
>     />
>   );
> }
> ```
>
> ### With Toolbox Actions
>
> Enable user feedback and actions:
>
> ```tsx theme={null}
> import { MarkdownMessage } from "@servicetitan/anvil2-ext-atlas";
>
> function MarkdownWithToolbox() {
>   return (
>     <MarkdownMessage
>       message="Here is a detailed response with **formatting**."
>       toolboxProps={{
>         onLike: () => handleLike(),
>         onDislike: () => handleDislike(),
>         onRetry: () => handleRetry(),
>       }}
>     />
>   );
> }
> ```
>
> ### Custom Branding
>
> Use custom icon and assistant name:
>
> ```tsx theme={null}
> import { MarkdownMessage } from "@servicetitan/anvil2-ext-atlas";
> import CustomLogo from "./custom-logo.svg";
>
> function CustomBrandedMessage() {
>   return (
>     <MarkdownMessage
>       message="Hello from the custom assistant!"
>       svgIcon={CustomLogo}
>       assistant="My Assistant"
>     />
>   );
> }
> ```

> [tab] MarkdownMessage API
>
> ```tsx theme={null}
> <MarkdownMessage
>   message="**Bold** and *italic*"
>   error="Error message"
>   svgIcon={CustomIcon}
>   assistant="Atlas"
>   onRetry={handleRetry}
>   toolboxProps={{
>     onLike: handleLike,
>     onDislike: handleDislike,
>   }}
> />
> ```
>
> ## `MarkdownMessage` Props
>
> **assistant** `string`
>
> Custom assistant name to display instead of "Atlas".
>
> **className** `string`
>
> Additional CSS class name for custom styling.
>
> **error** `string`
>
> Error message to display instead of content.
>
> **message** `string`
>
> Markdown content to render. When undefined, shows loading indicator.
>
> **onRetry** `() =\> void`
>
> Callback for retry button in error state.
>
> **svgIcon** `Svg`
>
> Custom icon to display instead of the Atlas logo.
>
> **toolboxProps** `Omit\<ToolboxProps, 'text'\>`
>
> Props to pass to the Toolbox component (excluding text which is set automatically).
>
> See the [Toolbox API](https://anvil.servicetitan.com/docs/kits/atlas/components/toolbox/code.md#toolbox-props) for more details.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.