One parser, every renderer. Component syntax, attributes, plugins, and streaming, with decoupled parsing you can run on the server, the client, or mid-stream.
# Hello World
A **high-performance** markdown parser with _streaming_ support.
## Features
- Parse markdown in real-time
- Vue, React, Svelte, and Angular components
- Auto-close incomplete syntax
::callout{color="info" icon="i-lucide-info"}
Comark handles **components in markdown** natively.
::
> Built for modern web applications.
```ts [example.ts]
import { parse } from 'comark'
const tree = await parse('# Hello **World**')A high-performance markdown parser with streaming support.
Built for modern web applications.
import { parse } from 'comark'
const tree = await parse('# Hello **World**')Component syntax stays in plain text. Parsing happens at build time or runtime, your choice, and works across any renderer. Built on five years of MDC, the parser behind Nuxt Content.
No build step. Parse Markdown with components on the server, in the browser, or in a worker. Content is live the moment it is saved.
Auto-close renders incomplete Markdown correctly at every frame. Pipe AI output straight into your component tree.
The same source renders to Vue, React, Svelte, Angular, Nuxt, HTML and ANSI. Your content outlasts your framework.
CommonMark and GFM by default. Attributes and components are opt-in syntax, not a new language.
Compatible with markdown-it plugins. Shiki highlighting, KaTeX math, Mermaid diagrams, table of contents and more.
Parse to plain arrays that are easy to traverse, cache, serialize, and send over the wire.
Parse content as it arrives. Built for AI chat interfaces and progressive loading.
Learn moreEmbed custom components in your Markdown and render them natively in Vue, React, Svelte and Angular.
<script setup lang="ts">
import { Comark } from '@comark/vue'
import Alert from './components/Alert.vue'
const md = `
# Hello **World**
::alert{type="info"}
This is a Comark component!
::
`
</script>
<template>
<Suspense>
<Comark :components="{ Alert }">
{{ md }}
</Comark>
</Suspense>
</template>Incomplete markdown syntax is automatically closed during streaming, so content renders correctly at every frame.
Learn moreExtend Comark with plugins for math formulas, syntax highlighting, and more. You can also reuse any markdown-it plugin.
LaTeX math formulas with KaTeX. Inline $...$ and display $$...$$ syntax.
Browse all pluginsThe area of a circle is .
Euler's identity:
Install Comark, pick a renderer, and render your first component in minutes.