Installation
Packages
Comark has three layers. Pick the one that matches what you're building:
| Framework Renderers | String Renderers | Core | |
|---|---|---|---|
| Package | @comark/vue @comark/react @comark/nuxt @comark/svelte | @comark/html @comark/ansi | comark |
| Provides | <Comark>, <ComarkRenderer> — internal parsing and rendering components | renderANSI(), renderHTML() — not framework related | parse(), renderMarkdown() — programmatic parsing and rendering |
| Output | Rendered Markdown document with interactive components | HTML string / ANSI terminal | AST or Markdown string |
| Choose when | Rendering Markdown with interactive UI components | HTML generation or CLI tooling | Transforms, round-tripping, or custom pipelines |
Framework Renderers
Use these when you need to render Markdown as an interactive document in Vue, React, Nuxt, or Svelte.
pnpm add @comark/vuenpm install @comark/vueyarn add @comark/vuebun add @comark/vuepnpm add @comark/reactnpm install @comark/reactyarn add @comark/reactbun add @comark/reactpnpm add @comark/nuxtnpm install @comark/nuxtyarn add @comark/nuxtbun add @comark/nuxtThen register the module in your nuxt.config.ts:
export default defineNuxtConfig({
modules: ['@comark/nuxt']
})pnpm add @comark/sveltenpm install @comark/svelteyarn add @comark/sveltebun add @comark/svelteString Renderers
Use these when you need a string output with no UI framework involved like server-side HTML generation, static site builds, or CLI tooling.
pnpm add @comark/htmlnpm install @comark/htmlyarn add @comark/htmlbun add @comark/htmlpnpm add @comark/ansinpm install @comark/ansiyarn add @comark/ansibun add @comark/ansiCore
comark is the foundation all other packages build on. Use it when you need to work with the AST itself and serialize back to Markdown.
comark separately if you're not using a framework renderer.pnpm add comarknpm install comarkyarn add comarkbun add comarkimport { parse, createParse } from 'comark'
import { renderMarkdown } from 'comark/render'
// Parse to AST
const tree = await parse(source)
// Transform nodes, then serialize back to Markdown
const output = await renderMarkdown(tree)
// Reusable parser — initializes plugins once, faster for batch processing
const parseDoc = createParse({ plugins: [highlight(), toc()] })See the Parse API and Render API for full options.
Quick Start
Pick your framework and get rendering in seconds.
Agent Skill
To give coding agents the Comark skill (syntax, AST, renderers, streaming), install it from production:
npx skills add https://comark.devLearn More
Learn more about Comark features and syntax:
Introduction
Comark is a powerful Markdown parser that extends standard Markdown with component syntax, enabling rich, interactive content in Vue and React applications.
Markdown
Comark supports all standard CommonMark and GitHub Flavored Markdown (GFM) features including headings, formatting, lists, tables, code blocks, and more.