Getting Started
Introduction
MDC Syntax is a powerful Markdown parser that extends standard Markdown with component syntax, enabling rich, interactive content in Vue and React applications.
What is MDC?
MDC stands for MarkDown Components. It's a syntax extension that lets you use components directly inside your Markdown content:
# Welcome to My Blog
This is regular **markdown** with a custom component:
::alert{type="warning"}
This is an important message!
::
MDC Syntax parses this into an AST that can be rendered by Vue or React, turning your Markdown into fully interactive content.
Key Features
Fast Parsing
Optimized parser that handles large documents efficiently with minimal memory usage.
Component Syntax
Embed custom components in Markdown with props, slots, and nested children.
Streaming Support
Real-time incremental parsing for AI chat interfaces and live content.
Framework Agnostic
First-class support for both Vue and React with dedicated renderers.
Syntax Highlighting
Built-in Shiki integration for beautiful code blocks with theme support.
GFM Support
Full GitHub Flavored Markdown support including tables, task lists, and more.
Quick Example
Here's how simple it is to render MDC content:
<script setup>
import { MDC } from 'mdc-syntax/vue'
const content = `
# Hello World
::alert{type="info"}
Welcome to MDC Syntax!
::
`
</script>
<template>
<MDC :markdown="content" />
</template>
import { MDC } from 'mdc-syntax/react'
const content = `
# Hello World
::alert{type="info"}
Welcome to MDC Syntax!
::
`
export default function App() {
return <MDC markdown={content} />
}
When to Use MDC Syntax
MDC Syntax is ideal for:
- Documentation sites - Write docs in Markdown with interactive examples
- Blog platforms - Rich content with custom components for callouts, embeds, and more
- AI chat interfaces - Stream and render Markdown responses in real-time
- CMS integrations - Let content editors use components without touching code
- Technical writing - Combine prose with live code examples and diagrams
How It Works
graph LR
A[Markdown + MDC] --> B[Parser]
B --> C[Minimark AST]
C --> D{Renderer}
D --> E[Vue]
D --> F[React]
D --> G[HTML]
- Parse - MDC Syntax parses your content into a compact Minimark AST
- Transform - The AST can be manipulated, cached, or serialized
- Render - Framework-specific renderers convert the AST to Vue or React components
Comparison with Other Tools
| Feature | MDC Syntax | MDX | Markdoc |
|---|---|---|---|
| Streaming support | |||
| Vue support | |||
| React support | |||
| No build step | |||
| Compact AST | |||
| Auto-close for streams |
Next Steps
Ready to get started? Follow these guides: