# CopilotMarkdown

> Render Markdown text with React Native styling tuned for chat. Renders streaming content as it arrives.

## Overview [#overview]

`CopilotMarkdown` renders a Markdown string with sensible React Native styling, built on [`react-native-streamdown`](https://www.npmjs.com/package/react-native-streamdown). It renders incomplete (streaming) Markdown incrementally as content arrives, which makes it ideal for assistant messages. Requires the `react-native-streamdown` peer dependency. [`AssistantMessage`](/reference/react-native/components/AssistantMessage) renders its content with this component.

## Import [#import]

```tsx
import { CopilotMarkdown, defaultMarkdownStyles } from "@copilotkit/react-native/components";
```

## Props [#props]

<PropertyReference name="content" type="string" required>
  The Markdown string to render.
</PropertyReference>

<PropertyReference name="style" type="MarkdownStyle">
  Optional style overrides merged on top of the defaults. A map of Markdown
  element names (e.g. `paragraph`, `h1`, `link`, `code`) to style objects, so
  you pass only the elements you change. A key you pass replaces the whole
  default style of that element.
</PropertyReference>

<PropertyReference name="streamingAnimation" type="boolean" default="true">
  Whether to enable the streaming fade-in animation as content arrives.
</PropertyReference>

## `defaultMarkdownStyles` [#defaultmarkdownstyles]

The default style map. The component merges `style` over these defaults one element at a time. To change one property of an element, spread the default for that element:

```tsx
import { CopilotMarkdown, defaultMarkdownStyles } from "@copilotkit/react-native/components";

const styles = {
  h1: { ...defaultMarkdownStyles.h1, fontSize: 28, fontWeight: "800" },
};

<CopilotMarkdown content={"# Hello\nThis is **bold**."} style={styles} />;
```

## Usage [#usage]

```tsx
import { CopilotMarkdown } from "@copilotkit/react-native/components";

<CopilotMarkdown content="**Hello** from CopilotKit!" />;
```
