Streaming chat
Render incoming responses, then add smooth output and a streaming cursor.
React →Vue →OPEN SOURCE · REACT + VUE
Render streaming Markdown in React and Vue. GFM, math and multilingual text, with your own components or Mantine for code highlighting and diagrams.
STREAMING / MATH / MULTILINGUAL
01 / FROM TEXT TO INTERFACE
Append incoming text to one string and pass it to your renderer. Your application handles the connection; AI Markdown handles the content.
Explore streaming →import AIMarkdown, { AIMarkdownStreamingCursor,} from '@ai-markdown/react';import '@ai-markdown/react/typography/default.css';import 'katex/dist/katex.min.css';
type Props = { text: string; streaming: boolean };
export function Message({ text, streaming }: Props) { return ( <AIMarkdown content={text} streaming={streaming} streamingCursor={AIMarkdownStreamingCursor} /> );}Pass the accumulated text and producer state from your parent component. See the quick start for dependencies and framework setup.
Set up React →<script setup lang="ts">import AIMarkdown from '@ai-markdown/vue';import '@ai-markdown/vue/styles.css';import 'katex/dist/katex.min.css';
defineProps<{ text: string; streaming: boolean }>();</script>
<template> <AIMarkdown :content="text" :streaming="streaming" /></template>Pass the accumulated text and producer state from your parent component. Vue shows the streaming cursor by default.
Set up Vue →02 / CHOOSE YOUR STARTING POINT
Components, hooks and custom renderers that fit your application.
React quick start →@ai-markdown/vueReactive props, scoped slots and composables for Vue applications.
Vue quick start →@ai-markdown/react-mantineTheme-aware typography, highlighted code and Mermaid diagrams.
Mantine quick start →03 / BUILD YOUR EXPERIENCE
Render incoming responses, then add smooth output and a streaming cursor.
React →Vue →Render tables, math and mixed-language text. Add code highlighting and diagrams with Mantine or custom components.
Explore supported syntax →Replace links, code blocks and other elements. Make Markdown feel at home in your product.
Find your configuration →START WITH ONE MESSAGE