Installation

Install Comark and choose a parser or renderer for HTML, ANSI, Vue, React, Svelte, or Angular to start working with Markdown in minutes.

Quick Start

Choose the output you need and render your first Markdown document in minutes.

HTML

Server-side rendering and static generation without a framework.

Vue

Use Comark in Vue 3 applications with full async component support and streaming.

Nuxt

Zero-config Nuxt module with auto-imported components and Nuxt UI integration.

React

Use Comark in React and Next.js applications.

Svelte

Use Comark in Svelte 5 applications with snippets and streaming.

Angular

Use Comark in Angular 17+ applications with standalone components and streaming.

ANSI

Render Comark as styled terminal output for CLIs and developer tooling.

Agent Skill

To give coding agents the Comark skill (syntax, AST, renderers, streaming), install it from production:

Terminal
npx skills add https://comark.dev

IDE Extension

Install the Comark extension in VS Code or Cursor for syntax highlighting, bracket matching, document folding, and auto-completion in .md files using Comark syntax.

Comark Extension

Or within your editor, open Quick Open (Ctrl+P / Cmd+P) and run:

ext install Nuxt.mdc

Browser Extension

Install Comark for GitHub to better visualize Markdown files that use Comark components and attributes syntax on GitHub.

Chrome Web Store

Firefox Add-ons

View Source / Manual Install

Packages

Comark packages share one pipeline. The core parser produces a serializable MarkdownDocument, while string and UI renderers consume that document. Install the package that matches your output:

UI Frameworks

Use these when you need to render Markdown as an interactive document in Vue, React, Nuxt, Svelte, or Angular.

pnpm add @comark/vue

String 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/html

Core

comark is the parser and document foundation used by every renderer. Use it directly to parse Markdown, inspect or transform the AST, cache or serialize documents, and render them back to Markdown.

All framework packages re-export its types, so you only need to install comark separately if you're not using a framework renderer.
pnpm add comark
import { parseMarkdown, createMarkdownParser } from 'comark'
import { renderMarkdown } from 'comark/render'

// Parse to AST
const document = await parseMarkdown(source)

// Transform nodes, then serialize back to Markdown
const output = await renderMarkdown(document)

// Reusable parser: initializes plugins once, faster for batch processing
const parseDoc = createMarkdownParser({ plugins: [shiki(), toc()] })

See the Parse API and Render API for full options.

Learn More

Learn more about Comark features and syntax:

Markdown Syntax

Learn the standard Markdown syntax and how to use it with Comark.

Components

Learn the component syntax for blocks, inline elements, props, and slots

Attributes

Add classes, IDs, and custom attributes to Markdown elements

Plugins

Add syntax highlighting, math, mermaid diagrams, and more