Documents
README
README
Type
External
Status
Published
Created
Mar 17, 2026
Updated
May 11, 2026
Updated by
Dosu Bot
Source
View

@assistant-ui/react-markdown#

react-markdown integration for @assistant-ui/react. Renders the assistant's markdown output as React components inside MessagePrimitive.Parts.

When to use this#

PackageBest for
@assistant-ui/react-markdownLightweight rendering; bring your own syntax highlighter.
@assistant-ui/react-streamdownFeature-rich with built-in Shiki, KaTeX, and Mermaid.
@assistant-ui/react-syntax-highlighterPair with react-markdown when you only need code-block highlighting.

Installation#

npm install @assistant-ui/react @assistant-ui/react-markdown react-markdown remark-gfm

Usage#

import { MarkdownTextPrimitive } from "@assistant-ui/react-markdown";
import remarkGfm from "remark-gfm";

export const MarkdownText = () => (
  <MarkdownTextPrimitive remarkPlugins={[remarkGfm]} className="aui-md" />
);

Plug <MarkdownText /> into MessagePrimitive.Parts as the Text component to render markdown for every text part.

Full reference at assistant-ui.com/docs/ui/markdown.